diff options
Diffstat (limited to 'lib/backbone/summary.js')
-rw-r--r-- | lib/backbone/summary.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/backbone/summary.js b/lib/backbone/summary.js index 009fb76..35f65e6 100644 --- a/lib/backbone/summary.js +++ b/lib/backbone/summary.js @@ -3,6 +3,7 @@ var util = require('util'); var url = require('url'); var location = require('../utils/location'); +var error = require('../utils/error'); var BackboneFile = require('./file'); @@ -15,10 +16,10 @@ function TOCArticle(summary, title, ref, articles, parent) { this.title = title; if (ref && location.isExternal(ref)) { - throw new Error('SUMMARY can only contains relative locations'); + throw error.ParsingError(new Error('SUMMARY can only contains relative locations')); } if (!title) { - throw new Error('SUMMARY entries should have an non-empty title'); + throw error.ParsingError(new Error('SUMMARY entries should have an non-empty title')); } var parts = url.parse(ref); |