I’m using the Gams .Net Api, and sometimes I need to know the exit code of the Gams process.
When it is any other than 0, a GAMSException is thrown. The ex.Message contains the exit code when is applicable, for example: “*** GAMS return code not 0 (3)”.
Although it would be an ugly solution, I could easily extract the number using a regexp but my code would break if the api changes the way of returning this message.
Is there some other way of getting the exit code? I have not found any about this in the documentation. If not, maybe it could be added as an attribute some place inside the corresponding GAMSJob object in a future version.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\
Hi,
At the moment there is no easier way to get the exit code from the GAMSJob class, but you made a good suggestion! We consider adding the code itself as additional information in the next release.
Best regards,
Lutz
On 2/11/2013 3:55 PM, Fernando Consigli wrote:
I’m using the Gams .Net Api, and sometimes I need to know the exit code
of the Gams process.
When it is any other than 0, a GAMSException is thrown. The ex.Message
contains the exit code when is applicable, for example: “*** GAMS return
code not 0 (3)”.
Although it would be an ugly solution, I could easily extract the number
using a regexp but my code would break if the api changes the way of
returning this message.
Is there some other way of getting the exit code? I have not found any
about this in the documentation. If not, maybe it could be added as an
attribute some place inside the corresponding GAMSJob object in a future
version.
–
You received this message because you are subscribed to the Google
Groups “gamsworld” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\
Lutz Westermann LWestermann@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW, Eupener Str. 135-137
Washington DC, 20007, USA 50933 Cologne, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1
http://www.gams.com http://www.gams.de
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
\