Class: MVCLI::Middleware::ExceptionLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/mvcli/middleware/exception_logger.rb,
lib/mvcli/middleware/exception_logger/validation_summary.rb

Defined Under Namespace

Classes: ValidationSummary

Instance Method Summary collapse

Instance Method Details

#call(command) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/mvcli/middleware/exception_logger.rb', line 7

def call(command)
  yield command
rescue MVCLI::Validatable::ValidationError => e
  ValidationSummary.new(e).write command.log
rescue Exception => e
  command.log << e.message + "\n"
  raise e
end