Quantcast

How to return an error from an extension

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to return an error from an extension

Gerrit .
Hi everybody,


After calling an Inkscape extension which generates output on stderr, a little info box pops up that says:


"Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected."


That's all fine, but how do you actually return an error code from a script? I tried "sys.exit(1)", but that didn't work.


Is there an example script shipped with Inkscape that returns an error?


Many thanks for an answer,

Gerrit



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to return an error from an extension

alvinpenner
- try using exit("your message")
- also, check out the Python source code in the directory \share\extensions\

hth,
Alvin
Loading...