1.11 Additional Details About try..endtry
As you may recall, the try..endtry
statement surrounds a block of statements in order to capture any exceptions that occur during the execution of those statements. The system raises exceptions in one of three ways: through a hardware fault (such as a divide-by-zero error), through an operating system-generated exception, or through the execution of the HLA raise
statement. You can write an exception handler to intercept specific exceptions using the exception
clause. The program in Example 1-8 provides a typical example of the use of this statement.
Example 1-8. try..endtry
example
program testBadInput; #include( "stdlib.hhf" ) static u: int32; begin testBadInput; try stdout.put( "Enter a signed integer:" ...
Get The Art of Assembly Language, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.