Exception: Doing::Errors::DoingNoTraceError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/doing/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, level: nil, topic: 'Error:', exit_code: 1) ⇒ DoingNoTraceError

Returns a new instance of DoingNoTraceError.



6
7
8
9
10
11
12
13
14
# File 'lib/doing/errors.rb', line 6

def initialize(msg = nil, level: nil, topic: 'Error:', exit_code: 1)
  level ||= :error
  Doing.logger.output_results
  if msg
    Doing.logger.log_now(level, topic, msg)
  end

  Process.exit exit_code
end