hexo/node_modules/stylus/lib/functions/error.js

18 lines
325 B
JavaScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
var utils = require('../utils');
/**
* Throw an error with the given `msg`.
*
* @param {String} msg
* @api public
*/
function error(msg){
utils.assertType(msg, 'string', 'msg');
var err = new Error(msg.val);
err.fromStylus = true;
throw err;
};
error.params = ['msg'];
module.exports = error;