Checks if given value is Error if it's subclass and then throw it.
Error
any value
value if it is not an instance of Error
value
const value = new Error()const value2 = assertNotError(value)// throws error Copy
const value = new Error()const value2 = assertNotError(value)// throws error
value if it is an instance of Error
Checks if given value is
Error
if it's subclass and then throw it.