Hello,
Sometimes you need to stop a piece of code and explain why you have to do it.
A good way is to raise an exception and to give information about the reason why.
This little class offers you a pratical way to do this :
1) Add the class to your project
Declare the instance in the starter module is a good idea
You pass the module, the method, an erorr number, an error message and say if you want to log the exception.
Class and example in the zip archive
SPSP
Sometimes you need to stop a piece of code and explain why you have to do it.
A good way is to raise an exception and to give information about the reason why.
This little class offers you a pratical way to do this :
1) Add the class to your project
2) Declare an instance of the class:
Public fException As clsException
3) Raise an exception:
Starter.fException.raise("Main","fButton_Click",1,$"Too big : (${i})"$,True)
4) Display information to the user:
wait for (fXUI.MsgboxAsync(Starter.fException.info,"Exception")) msgbox_result(result As Int)
Class and example in the zip archive
SPSP