Exception: Systemd::JournalError
- Inherits:
-
StandardError
- Object
- StandardError
- Systemd::JournalError
- Defined in:
- lib/systemd/journal_error.rb
Overview
This execption is raised whenever a sd_journal_* call returns an error.
Defined Under Namespace
Modules: LIBC
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the (positive) error number.
Instance Method Summary collapse
-
#initialize(code) ⇒ JournalError
constructor
Instantiate a new JournalError based on the specified return code.
Constructor Details
#initialize(code) ⇒ JournalError
Instantiate a new JournalError based on the specified return code. ‘message` will be filled in by calling `strerror()` with the provided return code.
12 13 14 15 |
# File 'lib/systemd/journal_error.rb', line 12 def initialize(code) @code = -code super(LIBC.strerror(@code)) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the (positive) error number.
7 8 9 |
# File 'lib/systemd/journal_error.rb', line 7 def code @code end |