You got:

>Without, the code will throw a null pointer exception resulting in an empty 
>list being displayed.

And you expect:

>Bare minimum, it would be nice to at least see an uncaught exception with the 
>debugger.

Can you explain the difference? If what you need is for the debugger to halt 
execution with a stack trace, then you can switch on 'pause on exceptions' in 
the dev tools. I must be missing something...
________________________________
From: Brian Raymes <brian.ray...@teotech.com>
Sent: Wednesday, March 10, 2021 7:16 PM
To: dev@royale.apache.org <dev@royale.apache.org>
Subject: Royale & NPE Behavior

Hi all,

I've been noticing a problem with Royale that I think is time to bring up with 
the greater audience.

What is the expected behavior when encountering an NPE within a Royale 
application? I've notice that NPEs seem to break the UI with no notice of any 
kind.

For example, I recently started trying out VirtualLists. For quite some time, I 
could not figure out why they would not render any of my data. It turns out, 
Virtual list requires the bead ListPresentationModel with a non-null rowHeight. 
This is due to VirtualListVerticalLayout's layout method assuming the existence 
of an IListPresentationModel. Without, the code will throw a null pointer 
exception resulting in an empty list being displayed.

The problem I want to highlight is that as a developer, without diving through 
the framework code, and ultimately guessing on trying various things 
beforehand, there was no way for me to know that happened. There is no console 
log output stating the error, no uncaught exception for the debugger to catch, 
and no visible reasoning for what is occurring.

Is this the expected behavior, or can this be improved? I've wasted a 
surprising amount of time chasing these issues in the past year while working 
with Royale.

Bare minimum, it would be nice to at least see an uncaught exception with the 
debugger.

Brian

Reply via email to