Is this the kind of error that you want to report to the callback, or more of an assertion failure that should throw an exception?

In either case, I'd recommend a console.error() here