diff --git a/lib/log.js b/lib/log.js index f733971..f2e288b 100644 --- a/lib/log.js +++ b/lib/log.js @@ -19,7 +19,7 @@ return ""; } else if (o instanceof Uint8Array) { return new TextDecoder().decode(o); - } else if (Error.isError(o)) { + } else if (o instanceof Error) { return o.toString(); } else { return "" + o; diff --git a/src/log.iced b/src/log.iced index f8e0cfb..5c00e46 100644 --- a/src/log.iced +++ b/src/log.iced @@ -20,7 +20,7 @@ default_level = L.INFO stringify = (o) -> if not o? then "" else if o instanceof Uint8Array then new TextDecoder().decode(o) - else if Error.isError(o) then o.toString() + else if o instanceof Error then o.toString() else ("" + o) ##======================================================================= diff --git a/test/all.iced b/test/all.iced index eb6f082..d98d514 100644 --- a/test/all.iced +++ b/test/all.iced @@ -70,7 +70,7 @@ class TestCase logger : () -> @_global.logger() search : (s, re, msg) -> - if Error.isError(s) + if s instanceof Error s = s.toString() @assert (s? and s.search(re) >= 0), msg