Class: LibComponent::LibError
- Inherits:
-
Object
- Object
- LibComponent::LibError
- Defined in:
- lib/openplacos/libcomponent.rb
Class Method Summary collapse
-
.quit(status_, str_) ⇒ Object
Only quit component Only use this method if component cannot connect to server.
-
.quit_server(status_, str_) ⇒ Object
Print an error message and make the server quit.
Class Method Details
.quit(status_, str_) ⇒ Object
Only quit component Only use this method if component cannot connect to server
527 528 529 530 |
# File 'lib/openplacos/libcomponent.rb', line 527 def self.quit(status_,str_) $stderr.puts str_ exit(status_) end |
.quit_server(status_, str_) ⇒ Object
Print an error message and make the server quit
514 515 516 517 518 519 520 521 522 523 |
# File 'lib/openplacos/libcomponent.rb', line 514 def self.quit_server(status_, str_) bus = DBus::ASessionBus.new server = bus.service("org.openplacos.server.internal") opos = server.object("/plugins") opos.introspect opos.default_iface = "org.openplacos.plugins" $stderr.puts str_ opos.exit(status_, str_) end |