switch to console.assert and new error subclass