Project

General

Profile

Actions

Bug #177

open

On Error Goto 100 ... or On Error Goto ERRLABEL cause compiler to crash.

Added by Brian Flanagan over 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
High
Target version:
Start date:
02/13/2020
Due date:
% Done:

0%

Estimated time:
24:00 h
Affected version:

Description

Complete examples below:

With Line Number:

On Error Goto 100
Error 123
100 Print "Error: ";Errn

Result:

First pass...
Second pass...
main.aoz:1:1: Compiler error: crash during compilation: pass: 2
cannot read property '3' of undefined
typeerror: cannot read property '3' of undefined
    at object.specialcases.handleonerror (c:\snapshot\compiler\compiler.js:0:0)
    at secondpass (c:\snapshot\compiler\compiler.js:0:0)
    at object.module.exports.compile (c:\snapshot\compiler\compiler.js:0:0)
    at compile (c:\snapshot\compiler\aoz.js:0:0)
    at aoz (c:\snapshot\compiler\aoz.js:0:0)
    at object.<anonymous> (c:\snapshot\compiler\aoz.js:0:0)
    at module._compile (pkg/prelude/bootstrap.js:1261:22)
    at object.module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at module.load (internal/modules/cjs/loader.js:651:32)
    at trymoduleload (internal/modules/cjs/loader.js:591:12)

Internal error
Task failed, no code generated...

With Label:

On Error Goto ERRLABEL
Error 123
ERRLABEL: Print "Error: ";Errn

Result:

First pass...
Second pass...
main.aoz:1:1: Compiler error: crash during compilation: pass: 2
cannot read property '2' of undefined
typeerror: cannot read property '2' of undefined
    at object.specialcases.handleonerror (c:\snapshot\compiler\compiler.js:0:0)
    at secondpass (c:\snapshot\compiler\compiler.js:0:0)
    at object.module.exports.compile (c:\snapshot\compiler\compiler.js:0:0)
    at compile (c:\snapshot\compiler\aoz.js:0:0)
    at aoz (c:\snapshot\compiler\aoz.js:0:0)
    at object.<anonymous> (c:\snapshot\compiler\aoz.js:0:0)
    at module._compile (pkg/prelude/bootstrap.js:1261:22)
    at object.module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at module.load (internal/modules/cjs/loader.js:651:32)
    at trymoduleload (internal/modules/cjs/loader.js:591:12)

Internal error
Task failed, no code generated...
Actions

Also available in: Atom PDF