Dec 21, 2020 Replies: 3 This is a simple b4xlib library that just allows throwing an IllegalArgumentException or a NumberFormatException. Sometimes a Toast or Dialog is not enough of an alert that something is going to break if the data passed is incorrect, especially in libraries. Compatible with B4a and B4j. Usage: B4X: Dim TH as Throwables TH.Initialize TH.Throw(Throwables_Static.NewIllegalArgumentException("Invalid Argument")) or TH.Throw(Throwables_Static.NewNumberFormatException("Invalid Number")) The exceptions can be caught in the normal way with a try .. catch block. Version 1 Tags: throw exception Attachments Throwables-b4xlib.b4xlib Throwables-b4xlib.b4xlib 3.3 KB · Views: 577 Last edited: Dec 21, 2020 Click to expand...
This is a simple b4xlib library that just allows throwing an IllegalArgumentException or a NumberFormatException. Sometimes a Toast or Dialog is not enough of an alert that something is going to break if the data passed is incorrect, especially in libraries. Compatible with B4a and B4j. Usage: B4X: Dim TH as Throwables TH.Initialize TH.Throw(Throwables_Static.NewIllegalArgumentException("Invalid Argument")) or TH.Throw(Throwables_Static.NewNumberFormatException("Invalid Number")) The exceptions can be caught in the normal way with a try .. catch block. Version 1 Tags: throw exception
stevel05 Expert Licensed User Longtime User Dec 21, 2020 #2 Sorry, one Dim jFX slipped through and would obviously break the B4a implementation. Please download it again now.
Sorry, one Dim jFX slipped through and would obviously break the B4a implementation. Please download it again now.
stevel05 Expert Licensed User Longtime User Dec 24, 2020 #4 Sorry, try it again now. and delete the original. I uploaded the wrong file. It should be Throwables-b4xlib.b4xlib
Sorry, try it again now. and delete the original. I uploaded the wrong file. It should be Throwables-b4xlib.b4xlib