Module: Babeltrace2::BTCurrentThread
- Defined in:
- lib/babeltrace2/error-reporting.rb
Defined Under Namespace
Modules: Error
Constant Summary collapse
- ErrorAppendCauseStatus =
BTCurrentThreadErrorAppendCauseStatus
Class Method Summary collapse
Class Method Details
.clear_error ⇒ Object
233 234 235 236 |
# File 'lib/babeltrace2/error-reporting.rb', line 233 def self.clear_error Babeltrace2.bt_current_thread_clear_error self end |
.move_error(error) ⇒ Object
238 239 240 241 242 243 |
# File 'lib/babeltrace2/error-reporting.rb', line 238 def self.move_error(error) raise Error.new("Error already released") unless error.handle Babeltrace2.bt_current_thread_move_error(error.handle) error.instance_variable_set(:@handle, nil) self end |
.take_error ⇒ Object
227 228 229 230 231 |
# File 'lib/babeltrace2/error-reporting.rb', line 227 def self.take_error handle = Babeltrace2.bt_current_thread_take_error return nil if handle.null? BTError.new(handle) end |