Exception: Rubiks::MondrianError
- Inherits:
-
StandardError
- Object
- StandardError
- Rubiks::MondrianError
- Defined in:
- lib/rubiks/mondrian/errors.rb
Constant Summary collapse
- NATIVE_MONDRIAN_ERROR_REGEXP =
/^(org\.olap4j\.|mondrian\.|java\.lang\.reflect\.UndeclaredThrowableException\: Mondrian Error\:)/
Instance Attribute Summary collapse
-
#native_error ⇒ Object
readonly
root_cause will be nil if there is no cause for wrapped native error root_cause_message will have either root_cause message or wrapped native error message.
-
#root_cause ⇒ Object
readonly
root_cause will be nil if there is no cause for wrapped native error root_cause_message will have either root_cause message or wrapped native error message.
-
#root_cause_message ⇒ Object
readonly
root_cause will be nil if there is no cause for wrapped native error root_cause_message will have either root_cause message or wrapped native error message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(native_error) ⇒ MondrianError
constructor
A new instance of MondrianError.
Constructor Details
#initialize(native_error) ⇒ MondrianError
Returns a new instance of MondrianError.
11 12 13 14 15 16 |
# File 'lib/rubiks/mondrian/errors.rb', line 11 def initialize(native_error) @native_error = native_error get_root_cause super(@root_cause_message) add_root_cause_to_backtrace end |
Instance Attribute Details
#native_error ⇒ Object (readonly)
root_cause will be nil if there is no cause for wrapped native error root_cause_message will have either root_cause message or wrapped native error message
9 10 11 |
# File 'lib/rubiks/mondrian/errors.rb', line 9 def native_error @native_error end |
#root_cause ⇒ Object (readonly)
root_cause will be nil if there is no cause for wrapped native error root_cause_message will have either root_cause message or wrapped native error message
9 10 11 |
# File 'lib/rubiks/mondrian/errors.rb', line 9 def root_cause @root_cause end |
#root_cause_message ⇒ Object (readonly)
root_cause will be nil if there is no cause for wrapped native error root_cause_message will have either root_cause message or wrapped native error message
9 10 11 |
# File 'lib/rubiks/mondrian/errors.rb', line 9 def @root_cause_message end |
Class Method Details
.wrap_native_exception ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/rubiks/mondrian/errors.rb', line 18 def self.wrap_native_exception yield rescue NativeException => e if e. =~ NATIVE_MONDRIAN_ERROR_REGEXP raise ::Rubiks::MondrianError.new(e) else raise end end |