Source language: Translate to:

hpwSetNewLispErr

Questions about NeoBook PlugIns

Moderator: Neosoft Support

hpwSetNewLispErr

Postby cp4w » Mon Jun 18, 2007 4:39 pm

hpwSetNewLispErr - the explanation states error routine name or varaiable ...

I understand the variable.

How would it work with an error routine name.
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Postby HPW » Mon Jun 18, 2007 10:44 pm

See init.lsp (in hpwSetNewLisp) and newlisp doc for 'error-event' or 'error-handler'.
You can make your own error-handler and whatever its print it will displayed in [LastError] or in your defined error-variable with hpwSetNewLispErr.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Mon Jun 18, 2007 11:18 pm

Correction: Not 'whatever' instead whatever starting with 'ErrorNum: ' (without the quotes but with the space, the 'ErrorNum: ' gets cut out by the plugin, so the rest is displayed in neobook)
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Mon Jun 18, 2007 11:59 pm

To be exact: The plugin injects this custom error handler onLoad:

Code: Select all
(define (error-handler) (print "ErrorNum: " (error-number) " " (error-text)))


You can overload it of cource. When you want that the result of your own error-handler is reported to the choosen error-variable you must start your own error-message with (print "ErrorNum: " ....).
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 2 guests

cron