Under Review
over 1 year ago

WERETECH-13439

allow to catch any system error

Of course the best would be to catch any piece of code but the most important is catching errors form system functions.

Now, there are 2 cases:
- already implemented catching (e.g. makeWebRequest can throw InvalidOptionsExceptione),
- simple crash error (e.g. Error Name: File Not Found Error when calling Storage.setvalue().

I know it can be a bit difficult to implement exceptions in all function but it should be rather easy to implement general exception that shows the same string like error (e.g. File Not Found Error) or at least number of error and list of all of them.

It allows to react for some strange unpredictable errors or errors connected with firmware bug for some devices.

My example:

Error Name: System Error
Occurrences: 4
First Occurrence: 2023-01-14
Last Occurrence: 2023-01-18
Devices:
    fēnix® 6X Pro / 6X Sapphire / 6X Pro Solar / tactix® Delta Sapphire / Delta Solar / Delta Solar - Ballistics Edition / quatix® 6X / 6X Solar / 6X Dual Power: 21.00
App Versions: 3.0.2

Error when saving data to storage. I have f6 and no any error, so where is problem? Corrupt storage, hardware, no space on drive... Nobody knows. Having general exception I can catch and show error in field or ? as no data, whatever but not IQ icon equivalent of window's death blue screen.

  • Of course, there are deep errors and usually you can see than runtime error at...

    But here I can see the name of error so it means system has caught an error so it is enough to propagate it.

  • There's a design philosophy which says that certain fatal errors like null pointer accesses in C/C++ should be allowed to crash, because trying to catch them just conceals deeper problems. Of course this assumes that testing will catch these crashes before the software is released to production.

    I think real question here is whether certain errors in Monkey C should be fatal errors or catchable exceptions. Maybe there's some fatal errors which would work better as exceptions?

  • yes, it's better to know that user saw IQ crash from era instead of prevent it... good approach...

    the main aim of each developer is to provide good app without crashing

    now, without my blame I can only report bug error which is usually not fixing not can't prevent anything

  • Would be good, but not sure if it would really help other than not seeing them in ERAViewer

  • My educated guess is that Monkey C / Connect IQ has uncatchable system errors by design (not that I agree with it) and I doubt that will change.