[Rock-dev] improving error messages in ruby

Alexander Duda Alexander.Duda at dfki.de
Wed Mar 21 15:42:58 CET 2012


There are cases there certain ruby libs are not available but are
required by a ruby script. To improve the error messages in these cases
I was thinking of introducing a rock_require.

Example:
rock_require 'TypelibQtAdapter' , "#{ERROR_VIZKIT_IS_NOT_FULLY_BUILD}"

rock_require would evaluating the second string if the require of the
first string fails and prints the resulting string as error message. 

The variable ERROR_VIZKIT_IS_NOT_FULLY_BUILD is a constant which gives a
description of the error + how to solve the error.

Any comments?

Alex

-- 
Dipl.-Ing. Alexander Duda 
Unterwasserrobotik

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

Phone: +49 (0)421 178-456620
Fax:   +49 (0)421 178-454150
E-Mail: alexander.duda 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