POV-Ray : Newsgroups : povray.unix : return code ? Server Time
23 Dec 2024 07:46:54 EST (-0500)
  return code ? (Message 1 to 1 of 1)  
From: hgonzalez
Subject: return code ?
Date: 24 Sep 2012 14:45:01
Message: <web.5060a82aa38766d68f5431080@news.povray.org>
I expected that povray executable retuns an error code != 0 if some error. From
the (gral) docs:  "POV-Ray itself returns such codes. It returns 0 for success,
1 for fatal error and 2 for user abort."

I've compiled povray 3.6, in Linux, and i don't see that behavior:

It returns error code if the command line is wrong...

$ povray sdasdsadasdsadasdsa
povray: cannot open the user configuration file
/home/hernan/.povray/3.6/povray.conf: No such file or directory
Could not find file 'sdasdsadasdsadasdsa.ini'
Cannot open INI file 'sdasdsadasdsadasdsa'.
Cannot process command-line due to a parse error.
This is not a valid command-line. Check the command-line for syntax errors,
correct them, and try again!
Valid command-line switches are explained in detail in the reference part of the
documentation.
To get a short list of command-line switches, use either the '-h', '-?', '-help'
or '--help' switch.
Failed to render file due to error(s)!
$ echo $?
248

But it does'nt for other (fatal) errors, as when the file is not found

$ povray +Iblablabla
povray: cannot open the user configuration file
/home/hernan/.povray/3.6/povray.conf: No such file or directory
Persistence of Vision(tm) Ray Tracer Version 3.6.1 (g++ 4.4.6 @
 x86_64-unknown-linux-gnu)
This is an unofficial version compiled by:
 hernan
 The POV-Ray Team(tm) is not responsible for supporting this version.
POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. Collins
Copyright 1991-2003 Persistence of Vision Team
Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.
.....
Possible Scene File Parser Initialization Error: Could not find file
 'blablabla.pov'
Scene File Parser Initialization Error: Cannot open input file.
.....
$ echo $?
0

Is this expected behaviour?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.