on ‎2011 Aug 22 4:13 PM
I would like to write a Java JAR file that implements IProgramBase (or IProgramBaseEx). These interfaces require that your class implement one method
void run(...) throws SDKException { ... }. And therein lies the problem, the method can only return
voidand can only throw an
SDKException.
The program I need to write may fail, and I would want someone to know that that has occurred. However, even if I throw an exception from within my program and use
System.out.println(...), the program's status returns success, while the log contains the exception message and stack trace.
I have managed to catch my exceptions and attempt to throw an SDK exceptoin, such as
SDKException.UnexpectedException(Throwable ex). However, all that results in is the program's status set to Failed (which is one thing that I want) and the very generic error message
An unexpected exception has occurred
. Even though the UnexpectedException takes a Throwable as an "inner" exception, the inner exception stack trace and/or error message is never displayed anywhere. Worse, there is no log file to access to see any stack traces in addition to the primary (outer) exception.
Is it even possible to tell Business Objects that a program object should return a status of Failed and have a log file for JAR-generated failures (as opposed to Business Objects failing to run the program object at all)?
Regards,
CS.
Request clarification before answering.
Thank you Robert and Ryan for following up on this. All of the information you provided was very helpful and will continue to be very helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.