lib/ayadn/alias.rb in ayadn-1.4.2 vs lib/ayadn/alias.rb in ayadn-1.4.3

- old
+ new

@@ -19,11 +19,11 @@ puts Status.done else puts Status.error_missing_channel_id end rescue => e - Errors.global_error("alias/create", args, e) + Errors.global_error({error: e, caller: caller, data: [args]}) ensure Databases.close_all end end @@ -39,11 +39,11 @@ puts Status.done else Action.quit Status.wrong_arguments end rescue => e - Errors.global_error("alias/delete", args, e) + Errors.global_error({error: e, caller: caller, data: [args]}) ensure Databases.close_all end end @@ -63,11 +63,11 @@ puts Status.done else puts "\nFile '#{new_db}' doesn't exist.".color(:red) end rescue => e - Errors.global_error("alias/import", database, e) + Errors.global_error({error: e, caller: caller, data: [database]}) ensure Databases.close_all end end @@ -88,11 +88,11 @@ end else puts Status.empty_list end rescue => e - Errors.global_error("alias/list", args, e) + Errors.global_error({error: e, caller: caller, data: [options]}) ensure Databases.close_all end end @@ -108,10 +108,10 @@ puts Status.done else abort Status.canceled end rescue => e - Errors.global_error("alias/clear", args, e) + Errors.global_error({error: e, caller: caller, data: []}) ensure Databases.close_all end end