lib/vault-tree/exceptions/empty_vault.rb in vault-tree-0.3.4 vs lib/vault-tree/exceptions/empty_vault.rb in vault-tree-0.6.0
- old
+ new
@@ -1,8 +1,23 @@
module VaultTree
module Exceptions
- class EmptyVault < VaultTreeException
- # Cant open emtpy vaults
- # Attempted to open an empty vault
+ class EmptyVault < LibraryException
+
+ def post_initialize(params)
+ @vault_id = params[:vault_id]
+ end
+
+ def runtime_information
+ %Q{The following vault was empty: #{@vault_id}
+
+ Vault Tree does not allow you to open an empty vault.
+ An empty vault means the the vault contents field is an empty
+ string.
+
+ * Are you closing the vaults in the right order?
+ * Are you attempting to open a vault before all
+ of the vaults that it references have been closed?
+ }
+ end
end
end
end