How can i throw an Exception in a class?

Djembefola

Active Member
Licensed User
Longtime User
How can i handle unexpected parameters in class method calls? Is it possible to throw an exception?

For example i have a class, which expects a certain file type as a parameter of the Initialize() method and then reads the file header.

If a file with an invalid or corrupted file header is passed, how can i prevent the calling module from executing subsequent method calls?
 
Top