From: David Vázquez Date: Thu, 2 May 2013 23:08:06 +0000 (+0100) Subject: `error' uses basic format X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=477e0ee81497531a490c208b9307b0872170bcde;p=jscl.git `error' uses basic format --- diff --git a/src/boot.lisp b/src/boot.lisp index 845b601..71b98ff 100644 --- a/src/boot.lisp +++ b/src/boot.lisp @@ -613,3 +613,7 @@ (defun values (&rest args) (values-list args)) + +(defun error (fmt &rest args) + (%throw (apply #'format nil fmt args))) + diff --git a/src/compiler.lisp b/src/compiler.lisp index 49ea708..d802263 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1548,7 +1548,7 @@ "return values.apply(this, forcemv(v));" *newline*) "globalEval(string)"))) -(define-builtin error (string) +(define-builtin %throw (string) (js!selfcall "throw " string ";" *newline*)) (define-builtin new () "{}")