I would say that the lang-ind spec only says that a binding spec must provide a way to indicate the listed errors. It does not say what package they have to be in. So, in my opinion, just guaranteeing that the exceptions exist in the Java language core is enough to satisfy the lang-ind spec. I have also changed my mind about the DRMAA_ERRNO_INVALID_ATTRIBUTE_FORMAT. It may be useful to be able to say, on setting a path or the native specification, that the argument is invalid. I will add the exception back into the spec. I have begun work on a first draft of the OO spec. Since it is based on the Java language binding spec, it has helped me uncover many minor issues with the Java language spec. I will send out an updated 0.6 document tomorrow before our meeting. Daniel Rajic, Hrabri wrote:
Dan,
On a minor note, you could also leave DRMAA_ERRNO_NO_MEMORY_ERROR and DRMAA_ERRNO_INVALID_ARGUMENT intact and chain them to the below mentioned exceptions. It will make things cross language more consistent. It doesn't change much in practice, but it could make more formal people happy.
-Hrabri
-----Original Message----- From: owner-drmaa-wg@ggf.org [mailto:owner-drmaa-wg@ggf.org] On Behalf Of Daniel Templeton Sent: Friday, January 07, 2005 11:07 AM To: DRMAA Working Group Subject: [drmaa-wg] Error Codes
I just (almost) finished the 0.6 draft of the Java language binding. It
is now a stand-alone document. (36 pages!) In the course of having to reread through everything and explain everything, I noticed that there are two more error codes which I don't think we need in the Java language binding. (We already skip the DRMAA_ERRNO_NO_MEMORY_ERROR sine
that's covered by the java.lang.OutOfMemoryError.) The first is the DRMAA_ERRNO_INVALID_ARGUMENT. I think this error is covered nicely by the java.lang.IllegalArgumentException and java.lang.NullPointerException. Besides, I don't think it actually applies. The INVALID_ARGUMENT is there to cover off-the-wall cases, where a completely wrong argument value is passed in, such as passing a pointer to a drmaa_job_template_t as the job id. Java is strongly typed, so that can't happen. The only thing you can do is pass in null,
and that's what the NullPointerException is there for. The second is the DRMAA_ERRNO_INVALID_ATTRIBUTE_FORMAT. It is used to indicate that the format of the string doesn't match what the attribute expects. In the Java language binding, we have strongly typed properties, so it isn't possible to pass in a badly formatted attribute value. Comments? If not, I'm removing these two exceptions from the spec.
I have one more small section to finish, and then I will send out the new draft. If everyone else happy with this draft, I think we can relabel it 1.0.
Daniel