Jump to content

Error Reporting


Recommended Posts

I'm almost done a plug-in based off the DDS plug-in, and I have a few questions before I complete it.

1) There are a few restrictions on the file format that I'm writing a plug-in for (e.g. the width and height of the image must be a power of two). How should I report these errors to the user? Is there a specific exception I must throw? Should I throw nothing and just show a message box (and not write to the stream)?

If I throw an exception all the user sees is: "There was an unspecified error while saving the file."

2) I'm not exactly a C# expert. Does the Guid need to be a unique random number? Is it supposed to be 8a543b8c-769f-44a2-a59a-fdfe6e6a1f20?

3) Is there any way I can better control the size of the SaveConfigWidget? The format I'm writing has a lot of options and it's really hard to squish them all into a small area without scrolling.



Link to comment
Share on other sites

1) Just throw a FormatException. THere is no way for a codec to provide a customized error message.

2) You don't need a Guid anymore, we were planning on using them but I don't think we will be anymore.

3) No, you will just have to scroll.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html


Link to comment
Share on other sites

Thanks for the quick response.

It would be nice if there was a way to provide error messages. As a work around, I just resized non power of two images to the nearest power of two. (Not ideal as users may wonder why the image is skewed, but more ideal than them just seeing "Error").

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...