mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 11:04:00 +00:00
Improve error message for missing classes
This commit is contained in:
parent
8621ca0f41
commit
de1b5350b0
1 changed files with 5 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
const parse = require("./parser");
|
||||
const { getClass } = require("./objects");
|
||||
const { getClass, getFormattedId } = require("./objects");
|
||||
const interpret = require("./virtualMachine");
|
||||
|
||||
function main({ runtime, data, system, log }) {
|
||||
|
|
@ -14,7 +14,10 @@ function main({ runtime, data, system, log }) {
|
|||
if (resolved == null && log) {
|
||||
const klass = getClass(hash);
|
||||
console.warn(
|
||||
`Class missing from runtime: ${hash} expected ${klass.name}`
|
||||
`Class missing from runtime: ${hash}`,
|
||||
klass == null
|
||||
? `(formatted ID: ${getFormattedId(hash)})`
|
||||
: `expected ${klass.name}`
|
||||
);
|
||||
}
|
||||
return resolved;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue