fix(basic.gblib): Allow MERGE keyword in storage #380. @othonlima
This commit is contained in:
parent
dee0c8cca7
commit
6d022b4023
2 changed files with 15 additions and 3 deletions
|
@ -549,7 +549,18 @@ export class GBVMService extends GBService {
|
|||
|
||||
// Defines local utility BASIC functions.
|
||||
|
||||
const ubound = (gbarray) => {return gbarray ? gbarray.length - 1: 0};
|
||||
const ubound = (gbarray) => {
|
||||
if (gbarray){
|
||||
let length = gbarray.length;
|
||||
if (length > 0){
|
||||
if(gbarray[0].gbarray){
|
||||
return length - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
const isarray = (gbarray) => {return Array.isArray(gbarray) };
|
||||
|
||||
// Proxies remote functions as BASIC functions.
|
||||
|
@ -782,7 +793,7 @@ export class GBVMService extends GBService {
|
|||
|
||||
let line = lines[i - 1];
|
||||
|
||||
// Remove lines before statments.
|
||||
// Remove lines before statements.
|
||||
|
||||
line = line.replace(/^\s*\d+\s*/gi, '');
|
||||
|
||||
|
|
|
@ -112,7 +112,8 @@ export class GBServer {
|
|||
process.on('uncaughtException', (err, p) => {
|
||||
if (err !== null) {
|
||||
err = err['e'] ? err['e'] : err;
|
||||
GBLog.error(`UNCAUGHT_EXCEPTION: ${err.toString()} ${err['stack'] ? '\n' + err['stack'] : ''}`);
|
||||
const msg = `${err['code']?err['code']:''} ${err.message?err.message:''} ${err['description']?err['description']:''}`
|
||||
GBLog.error(`UNCAUGHT_EXCEPTION: ${err.toString()} ${err['stack'] ? '\n' + err['stack'] : ''} ${msg}`);
|
||||
} else {
|
||||
GBLog.error('UNCAUGHT_EXCEPTION: Unknown error (err is null)');
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue