mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
for jsdoc3/jsdoc3.github.com#5 - mention jsdoc/util/error in plugin docs
This commit is contained in:
parent
4a57a3718c
commit
7678689278
@ -343,6 +343,17 @@ conf.json file. A plugin can stop later plugins from visiting a node by
|
||||
setting a ```stopPropagation``` property on the event object (e.stopPropagation = true).
|
||||
A plugin can stop the event from firing setting a ```preventDefault``` property.
|
||||
|
||||
### Throwing Errors
|
||||
|
||||
If you wish your plugin to throw an error, do it using the `handle` function in
|
||||
the `jsdoc/util/error` module:
|
||||
|
||||
require('jsdoc/util/error').handle( new Error('I do not like green eggs and ham!') );
|
||||
|
||||
By default this will throw the error, halting the execution of `jsdoc`. However,
|
||||
if the user used the `--lenient` switch when they ran `jsdoc` it will simply log
|
||||
the error to the console and continue.
|
||||
|
||||
Packaging JSDoc 3 Plugins
|
||||
----
|
||||
|
||||
@ -370,4 +381,4 @@ The task is passed a directory that should look something like the following:
|
||||
\- publish.js
|
||||
|
||||
Basically everything is copied over into the jsdoc installation directory, the
|
||||
directory should contain anything you want to put there.
|
||||
directory should contain anything you want to put there.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user