PHP codegen improvements

This commit is contained in:
Andreas Rumpf 2016-05-12 03:02:39 +02:00
commit 746132d696
3 changed files with 6 additions and 3 deletions

View file

@ -121,7 +121,10 @@ proc raiseException(e: ref Exception, ename: cstring) {.
when not defined(noUnhandledHandler):
if excHandler == 0:
unhandledException(e)
asm "throw `e`;"
when defined(nimphp):
asm """throw new Exception($`e`["message"]);"""
else:
asm "throw `e`;"
proc reraiseException() {.compilerproc, asmNoStackFrame.} =
if lastJSError == nil: