|
From: Juergen H. <jh...@we...> - 2006-03-21 14:51:17
|
Hi,=20Leif.=20The=20following=20code=20makes=20it=20hard=20to=20debug=20pr=
oblems=20when=20you=20
get=20that=20error...
=20=20=20=20/*=20Get=20the=20full=20path=20and=20filename=20of=20this=20pr=
ogram=20*/
=20=20=20=20if=20(realpath(app,=20szPath)=20=3D=3D=20NULL)=20{
=20=20=20=20=20=20=20=20log_printf(WRAPPER_SOURCE_WRAPPER,=20LEVEL_FATAL,=20=
=09=09"Unable=20to=20get=20the=20path-%s",=20getLastErrorText());
=20=20=20=20=20=20=20=20return=201;
=20=20=20=20}
A=20better=20version=20would=20be:
=20=20=20=20=20=20=20=20log_printf(WRAPPER_SOURCE_WRAPPER,=20LEVEL_FATAL,=20=
=09=09"Unable=20to=20get=20the=20path=20for=20'%s'-%s",=20app,=20getLastEr=
rorText
());
This=20might=20be=20true=20for=20other,=20similar=20error=20messages.
Ciao,=20J=FCrgen
|