More information to all error messages and exceptions

848
0
02-06-2015 05:05 AM
JuhoVainio
Occasional Contributor

I've been programming with ESRI's frameworks and SDKs for some time now and they seem quite powerful to me. However, there are time when I wish I didn't have this job and that's when I get one of ESRI's wonderful error messsages.

Every API should have a detailed documentation about what it does and what exception it may throw and how to recover from them. Currently even the newest SDK (for .NET in my case) doesn't even have API documentation included and most of the time any exception thrown is just an "error."

This must be fixed, because we developers are spending countless hours trying to figure out just what went wrong when the only information we have is "Error occured".

For example, a recent message I had: "Abort due to constraint violation". How do I figure out what constraint was violated? The framework surely knows this, so why it can't include it in the exception's message?

Or perhaps "Additional information:Item not found in the database. (Table, domain, relationship class, etc.) :", care to tell what item not found was and not list all the possible choices for the developer to test?

I'm suggesting that ESRI creates some error codes and every time an exception is thrown, you can look up the error code list and see what's going on and what measures to take to fix it. Or simply include the whole error message for the developer to see. The more vague the messages are, the more forum posts and support tickets you have to address.

In my opinion, no error message can be too detailed, so please feel free to include as much information as you can in them.

Thanks.