Exception: DTK::Client::DtkError::InternalError

Inherits:
DTK::Client::DtkError show all
Defined in:
lib/dtk_error.rb

Direct Known Subclasses

Client, Server

Constant Summary collapse

InternalErrorLabel =
'INTERNAL ERROR'

Instance Attribute Summary

Attributes inherited from DTK::Client::DtkError

#backtrace

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DTK::Client::DtkError

raise_error, raise_if_error?

Constructor Details

#initialize(error_msg, opts = {}) ⇒ InternalError

Returns a new instance of InternalError.



73
74
75
76
# File 'lib/dtk_error.rb', line 73

def initialize(error_msg,opts={})
  msg_to_pass_to_super = "[#{label(opts[:where])}] #{error_msg}"
  super(msg_to_pass_to_super,opts)
end

Class Method Details

.label(where = nil) ⇒ Object



77
78
79
80
# File 'lib/dtk_error.rb', line 77

def self.label(where=nil)
  prefix = (where ? "#{where.to_s.upcase} " : '')
  "#{prefix}#{InternalErrorLabel}"
end