Quantcast
Channel: Microsoft Dynamics 365 Community
Viewing all articles
Browse latest Browse all 53708

The Perfect Error Message

$
0
0

Okay, we all get errors from time to time.

I am a firm believer that the more lines of code a program has, and the more programmers working on that code over the life of the application it becomes impossible not to have an error in the code somewhere. Being a developer for more years than I care to count has proven that to me repeatedly.

Of course, we all know have experienced that error message that just was not very helpful in figuring out what when wrong were. Like the fact that we need to edit a config file but does not tell us which config file.

Please do not get me wrong, I will be the first to admit that in some sections of code that I have written, where I did not think anything could possibly go wrong that I did not spend that much time on the error handling section of that specific section of code. I will even admit that sometimes I did not put any error handling in sections of code but rather depended on the calling code block to take care of any errors. Thus, cryptic error messages at best if something does go wrong.

However, has anyone ever seen the “Perfect Error Message”?

A message that not only gives you pertinent information such as the username, the domain name, process information, and other details, but also tells you exactly what is wrong or what is missing.

A while back, I was working with the Web Client for Microsoft Dynamics GP 2015 and ran across the following error message. It was so perfect, in my humble opinion, that I just had to blog it.

Now before I post the screen shot of the error message I will have to redact sensitive information, which I will do with black. However, the information that I am covering up was precise and understandable information like the actual domain name, user name, even the tenant name was included.

Also, notice that even the application directory, DEX INI File, and the SET file were all in the error message. See the information inside the red box in the above image.

Now notice the error itself unlined in green above.

“The system cannot find the file specified”.

However, at least to me, the next line is the best! Look at what is in the blue box above.

It actually tells me the name of the file that it could not find, and where the file should be located.

Moreover, yes, that file was missing, and once I fixed that, everything worked great.

Now, I do not know who wrote that section of code, or how the code works, I am not privy to Microsoft source code, but to whom ever wrote that section of code, my “hats off to you”, and thank you so much for taking the time to write the code necessary to display all of that information.

Till later,


Viewing all articles
Browse latest Browse all 53708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>