aboutsummaryrefslogtreecommitdiff
path: root/node_modules/stylus/lib/functions/error.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/stylus/lib/functions/error.js')
-rw-r--r--node_modules/stylus/lib/functions/error.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/stylus/lib/functions/error.js b/node_modules/stylus/lib/functions/error.js
new file mode 100644
index 00000000..0330552f
--- /dev/null
+++ b/node_modules/stylus/lib/functions/error.js
@@ -0,0 +1,15 @@
+var utils = require('../utils');
+
+/**
+ * Throw an error with the given `msg`.
+ *
+ * @param {String} msg
+ * @api public
+ */
+
+module.exports = function error(msg){
+ utils.assertType(msg, 'string', 'msg');
+ var err = new Error(msg.val);
+ err.fromStylus = true;
+ throw err;
+};