[Rock-dev] orocos/configuration.rb: no warning on non-existent file

Sylvain Joyeux sylvain.joyeux at dfki.de
Mon Nov 25 10:50:10 CET 2013


On 11/22/2013 04:03 PM, Martin Zenzes wrote:
> Hi,
>
> while following the tutorial [1], I made a typo trying loading a
> configuration-file in the tasks ruby-script:
>
> {{{
>     message_producer.apply_conf_file("unintnetional_typo.yml")
> }}}
>
> After following the code, it looks like the "load_file" function in
> "tools/orocos.rb/lib/orocos/configuration.rb" silently returns on
> non-existent filenames, instead if issuing a warning.
>
> Wouldn't be a message nice? See attached patch.
IMO, it should raise an exception

Looking at the history, this is a mis-refactoring. The original code was
in load_dir (in which it is OK to ignore e.g. other directories) and it
got moved to load_file (where it is definitely NOT ok).

-- 
Sylvain Joyeux (Dr.Ing.)
Senior Researcher

Space & Security Robotics
Underwater 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