Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Alternative to window.onerror?

Webworks doesn't support 'window.onerror'. It's quite common for it to be missing from Webkit based browsers, but Chrome now has it on the desktop.

 

Is it worth making a feature request for it?

 

Is there an alternative on the PlayBook? I couldn't find a global error listener in the API and some errors are impossible to trap without it...

 

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
Posts: 323
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Alternative to window.onerror?

This is an extremely frustrating feature to be "missing" from the webworks platform and I totally agree it should be added/included.

 

Additionally/alternatively on the PlayBook, there is a dev mode option that opens up a web inspector on port 1337 that would also be very handy for testing webworks apps on the phone.

 

If there is anything we can do to increase the urgency of adding a window.onerror implementation in webworks please advise.


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Developer
Posts: 323
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Alternative to window.onerror?

Apparently this is likely due to a feature lacking in WebKit itself.

 

Bug 8519 https://bugs.webkit.org/show_bug.cgi?id=8519 suggests that this feature has been added to WebKit (and thus hopefully will trickle down to BlackBerry devices at some point soon.

 

So hopefully its just a waiting game now ;-)


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Developer
Posts: 60
Registered: ‎06-08-2011
My Device: n/a
My Carrier: n/a

Re: Alternative to window.onerror?

How are you currently handling errors globally without window.onerror in a Webworks app?

Developer
Posts: 323
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Alternative to window.onerror?

I've tried to build my app so that all BlackBerry specific method calls are only made if the app is loaded on a device.

This allows me the ability to also load my app in Chrome on my desktop to find small but annoying bugs... It's not perfect but it is better than nothing.

PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****