ADA handles programmer defined exceptions and system defined exceptions Some of the system defined exceptions are like NUMERIC_ERROR - raised whenever the abnormal precision in the program like divide by zero STORAGE-ERROR - raised whenever the program runs out of memory space CONSTRAINT_ERROR - asserts when a variable goes out of its bound TASKING_ERROR - raised during the incorrect use of tasks PROGRAM_ERROR- raised whenever an exception is not captured by any other conditions Example on Exceptions //Program to create two programmer defined exceptions declare P,PRESSURE:float; HIGH_PRESSURE, LOW_PRESSURE:exception; begin loop P:=READ_PRESSURE(PRESSURE); if P raise LOW_PRESSURE; elseif P>150 then raise HIGH_PRESSURE; end if; end loop; exception when LOW_PRESSURE => put("Warning: Very Low Pressure"); when HIGH_PRESSURE => put ("Warning: High Pressure"); When exceptions are raised in multiple procedures or block and Procedures, hand...
Its all about Network Simulations (NS2, NS3), Internet of Things, Sensor Networks, Programming, Embedded Systems, Cyber Physical Systems, etc