Book a Demo

Author Topic: Best practice for reporting add-in load errors  (Read 3986 times)

pmullin

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Best practice for reporting add-in load errors
« on: November 09, 2007, 06:23:08 am »
What is the recommended approach for communicating some sort of add-in initialization error back to EA, ideally so that a custom error message can be displayed in the add-in manager?

In my particular case, I am loading some object definitions using Spring.NET and want to clearly communicate any configuration errors back to the user, as opposed to the standard "Error - Missing" message.

Also, does EA provide any logging hooks to plug-in developers, or should we just using our logging framework of choice?

Eric Johannsen

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-0
  • Model Driven Business[ch0174]
    • View Profile
Re: Best practice for reporting add-in load errors
« Reply #1 on: November 19, 2007, 02:10:26 pm »
I'm not aware of a framework in EA either for handling error reports from the plugin, or for logging issues that arise while a plugin is executing.

If a plugin throws an exception, EA will display a rather generic exception dialog.  Other than that you're on your own when it comes to presenting feedback to your users.

I write quite a few plugins, so I created a plugin framework that loads all of the plugins I have written, and presents to them a common framework for error reporting and logging (among other things).  If you intend to develop more than a few plugins, I suggest that sort of approach.

My company has plans to publish our framework for free (in binary form).  Let me know if you are interested in beta testing it rather than writing your own.

Eric

thomaskilian

  • Guest
Re: Best practice for reporting add-in load errors
« Reply #2 on: November 20, 2007, 04:03:08 am »
I found that exceptions from Perl (sent to STDERR, i guess) are passed just to the Msgbox appearing in case of failure. So I manage to print reasonable PMD info to STDERR.