[Rock-dev] improving error messages in ruby

Sylvain Joyeux sylvain.joyeux at dfki.de
Wed Mar 21 18:16:12 CET 2012


You could do it manually in each case. For instance, in vizkit.rb, you 
manually do

begin
   require 'TypelibQtAdapter'
rescue LoadError
   # display message and exit 1
end

I don't really think that creating a new rock_require makes sense in 
this case. In essence, you will have up to one such require block per 
library, and this is part of the library, not part of the user scripts.

Thoughts ?

> I don't really see a nice way to detect thinks like this without having
> side effects.
>
> Declaring packages which are always being built even if someone calls
> "build ." might be a better solution.
This is often impractical, as sometimes people want to add "example" 
scripts in their packages that depend on other stuff to be there, but 
without forcing these dependencies.
-- 
Sylvain Joyeux (Dr.Ing.)
Space & Security Robotics

!!! Achtung, neue Telefonnummer!!!

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-454136
Fax:   +49 (0)421 218-454150
E-Mail: robotik at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3
-----------------------------------------------------------------------


More information about the Rock-dev mailing list