Method: Sym::Application#execute

Defined in:
lib/sym/application.rb

#executeObject



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/sym/application.rb', line 58

def execute
  execute!

rescue ::OpenSSL::Cipher::CipherError => e
  { reason:    'Invalid key provided',
    exception: e }

rescue Sym::Errors::Error => e
  { reason:    e.class.name.gsub(/.*::/, '').underscore.humanize.downcase,
    exception: e }

rescue TypeError => e
  if e.message =~ /marshal/
    { reason: 'Corrupt source data or invalid/corrupt key provided',
      exception: e }
  else
    { exception: e }
  end

rescue StandardError => e
  { exception: e }
end