mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 05:05:47 +01:00
Make invalid hostname better
This commit is contained in:
parent
7f72d77428
commit
315b2adf30
@ -166,7 +166,8 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
||||
const safeGetServer = function (hostname: string, ctx: NetscriptContext): BaseServer {
|
||||
const server = GetServer(hostname);
|
||||
if (server == null) {
|
||||
throw ctx.makeRuntimeErrorMsg(`Invalid hostname: ${hostname}`);
|
||||
const str = hostname === "" ? "'' (empty string)" : "'" + hostname + "'";
|
||||
throw ctx.makeRuntimeErrorMsg(`Invalid hostname: ${str}`);
|
||||
}
|
||||
return server;
|
||||
};
|
||||
|
@ -521,8 +521,6 @@ export class Sleeve extends Person {
|
||||
this.shock = 1;
|
||||
this.storedCycles = 0;
|
||||
this.sync = Math.max(this.memory, 1);
|
||||
|
||||
this.logs = [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user