bootstrap loads engine

This commit is contained in:
2026-02-10 12:13:18 -06:00
parent 3d71f4a363
commit 0d8b5cfb04
5 changed files with 25 additions and 30 deletions

View File

@@ -109,23 +109,7 @@ var REPLYTIMEOUT = 60 // seconds before replies are ignored
function caller_data(depth)
{
var _depth = depth == null ? 0 : depth
var file = "nofile"
var line = 0
var md = null
var m = null
var caller = array(Error().stack, "\n")[1+_depth]
if (caller) {
md = extract(caller, /\((.*)\:/)
m = md ? md[1] : "SCRIPT"
if (m) file = m
md = extract(caller, /\:(\d*)\)/)
m = md ? md[1] : 0
if (m) line = m
}
return {file,line}
return {file: "nofile", line: 0}
}
function console_rec(line, file, msg) {
@@ -140,9 +124,7 @@ function log(name, args) {
if (name == 'console') {
os.print(console_rec(caller.line, caller.file, msg))
} else if (name == 'error') {
if (msg == null) msg = Error()
if (is_proto(msg, Error))
msg = msg.name + ": " + msg.message + "\n" + msg.stack
if (msg == null) msg = "error"
os.print(console_rec(caller.line, caller.file, msg))
} else if (name == 'system') {
msg = "[SYSTEM] " + msg
@@ -166,7 +148,7 @@ function actor_die(err)
if (overling) {
if (err) {
// with an err, this is a forceful disrupt
reason = (is_proto(err, Error)) ? err.stack : err
reason = err
report_to_overling({type:'disrupt', reason})
} else
report_to_overling({type:'stop'})
@@ -300,8 +282,8 @@ $_.time_limit = function(requestor, seconds)
callback(val, reason)
}, value)
} disruption {
cancel(Error('requestor failed'))
callback(null, Error('requestor failed'))
cancel('requestor failed')
callback(null, 'requestor failed')
}
do_request()