MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Development (https://www.mobileread.com/forums/forumdisplay.php?f=240)
-   -   Plugin version reporting during error (https://www.mobileread.com/forums/showthread.php?t=224597)

Sabardeyn 10-12-2013 01:24 AM

Plugin version reporting during error
 
Just a thought that occurred to me while reading the Generate Cover plugin's most recent thread. Not sure how useful this might be to the programmers, but I thought it might cut down on a round of messages simply because the info is already included. I am not sure if this might lead to some "false positives" with the cause for an error though. (That is, the inclusion of a plugin's name might imply the error is plugin related when the error doesn't have anything to do with the plugin itself but rather poor input.)

When the user requests a plug in to perform an operation, have the plug in pass along a name and version number to calibre as the first steps in that operation. Prior to any data manipulation of any kind. In this way, if an error results and a log is posted, the calibre version number and the plug in name and version number are shown automatically.

So, something like this:
calibre, version 1.6.0
<plugin_name>, version <plugin_version>
ERROR: Unhandled exception: <b>Exception</b>:Pixel cache allocation failed `' @ error/cache.c/OpenPixelCache/4017

calibre 1.6 isfrozen: True is64bit: False
Windows-7-6.1.7601-SP1 Windows ('32bit', 'WindowsPE')
('Windows', '7', '6.1.7601')
Python 2.7.5
Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free')
Traceback (most recent call last):

I'm assuming there would be two string variables: plugin_name and plugin_version.

When the plugin's operation successfully completes it should clear these two variables so that the next operation can reset them as needed. Since this could be from the same or a different plugin, or from calibre itself, clearing the variables will prevent mistaken reporting.

Like I said, random thought. Use or discard as you see fit.


All times are GMT -4. The time now is 07:17 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.