Module: Babeltrace2::BTCurrentThread::Error
- Defined in:
- lib/babeltrace2/error-reporting.rb
Constant Summary collapse
- AppendCauseStatus =
BTCurrentThreadErrorAppendCauseStatus
Class Method Summary collapse
- .append_cause_from_component(self_component, message_format, *args, file_name: nil, line_number: nil) ⇒ Object
- .append_cause_from_component_class(self_component_class, message_format, *args, file_name: nil, line_number: nil) ⇒ Object
- .append_cause_from_message_iterator(self_message_iterator, message_format, *args, file_name: nil, line_number: nil) ⇒ Object
- .append_cause_from_unknown(module_name, message_format, *args, file_name: nil, line_number: nil) ⇒ Object
Class Method Details
.append_cause_from_component(self_component, message_format, *args, file_name: nil, line_number: nil) ⇒ Object
247 248 249 250 251 252 253 254 255 256 |
# File 'lib/babeltrace2/error-reporting.rb', line 247 def self.append_cause_from_component(self_component, , *args, file_name: nil, line_number: nil) loc = caller_locations.first file_name = loc.path unless file_name line_number = loc.lineno unless line_number res = Babeltrace2.bt_current_thread_error_append_cause_from_component( self_component, file_name, line_number, , *args) raise res.to_s if res != :BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_STATUS_OK self end |
.append_cause_from_component_class(self_component_class, message_format, *args, file_name: nil, line_number: nil) ⇒ Object
269 270 271 272 273 274 275 276 277 278 |
# File 'lib/babeltrace2/error-reporting.rb', line 269 def self.append_cause_from_component_class(self_component_class, , *args, file_name: nil, line_number: nil) loc = caller_locations.first file_name = loc.path unless file_name line_number = loc.lineno unless line_number res = Babeltrace2.bt_current_thread_error_append_cause_from_component_class( self_component_class, file_name, line_number, , *args) raise res.to_s if res != :BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_STATUS_OK self end |
.append_cause_from_message_iterator(self_message_iterator, message_format, *args, file_name: nil, line_number: nil) ⇒ Object
258 259 260 261 262 263 264 265 266 267 |
# File 'lib/babeltrace2/error-reporting.rb', line 258 def self.(, , *args, file_name: nil, line_number: nil) loc = caller_locations.first file_name = loc.path unless file_name line_number = loc.lineno unless line_number res = Babeltrace2.( , file_name, line_number, , *args) raise res.to_s if res != :BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_STATUS_OK self end |
.append_cause_from_unknown(module_name, message_format, *args, file_name: nil, line_number: nil) ⇒ Object
280 281 282 283 284 285 286 287 288 289 |
# File 'lib/babeltrace2/error-reporting.rb', line 280 def self.append_cause_from_unknown(module_name, , *args, file_name: nil, line_number: nil) loc = caller_locations.first file_name = loc.path unless file_name line_number = loc.lineno unless line_number res = Babeltrace2.bt_current_thread_error_append_cause_from_unknown( module_name, file_name, line_number, , *args) raise res.to_s if res != :BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_STATUS_OK self end |