doonfrs / pluto_grid_plus

PlutoGrid is a dataGrid for flutter that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.
https://pluto.weblaze.dev
MIT License
27 stars 28 forks source link

Added Null throw to signal field isn't defined #77

Closed piperun closed 1 month ago

piperun commented 2 months ago

Not sure if try catch is welcomed, but I stumbled upon: null check operator used on a null value and took a while to debug and find out that it was a null check operator within state_grid_manager.

If no try catch I suppose we could do something like:

for (final ref in refColumns){
   if(ref.field == null) {
   //...
   }
}
// rest of code
doonfrs commented 2 months ago

If you want to rethrow all exceptions ( general catch ) you don't need to try to catch from the beginning. what do you think ?

piperun commented 2 months ago

If you want to rethrow all exceptions ( general catch ) you don't need to try to catch from the beginning. what do you think ?

I think that depends, right now we rethrow all exceptions, but perhaps overtime with enough overhaul it might get to a point where we want to handle certain exceptions in a particular fashion.

I kinda also think it looks cleaner/tells the developer that "this is for exception handling".