Closed johnd0e closed 5 years ago
I suppose we should fix console.
@modos189 Could you look it?
A backup for discussion in telegram
Currently Android's WebView could only pass string message to host application. And these message are actually generated use Object.toString(). Thus throw new CustomError("message")
would just give the host application [object Object]
.
If we want to fetch more information in host application, we have to format that message before throw or just implement the toString()
method
throw 'string'
throw new Error 'string'
throw {error: 'string'}
Mostly 1st used. 2nd is better, but mobile debug console is able to handle plain strings only.
I suppose we should fix console.