ExceptionHandler example 1
Usageβ
PROGRAM main
USE easifemBase
USE easifemClasses
IMPLICIT NONE
TYPE(ExceptionHandler_) :: e
- Instance of [[ExceptionHandler_]]
CHARACTER(LEN=*), PARAMETER :: modname = "ExceptionHandler_test_1.F90"
CHARACTER(LEN=*), PARAMETER :: myname = "main()"
Set quite mode off, [[ExceptionHandler_#SetQuiteMode]].
CALL e%setQuietMode(.FALSE.)
- [[ExceptionHandler_#RaiseInformation]]
CALL e%raiseInformation(modName//"::"//myName//" - "// &
& 'Hello world')
Result:
[π INFORMATION β ] [π Module ] ExceptionHandler_test_1.F90 [π Method ] main() [π Message] Hello world
- [[ExceptionHandler_#RaiseWarning]]
CALL e%raiseWarning(modName//"::"//myName//" - "// &
& 'Hello world')
[β WARNING β] [π Module ] ExceptionHandler_test_1.F90 [π Method ] main() [π Message] Hello world
- [[ExceptionHandler_#RaiseDebug]]
CALL e%raiseDebug(modName//"::"//myName//" - "// &
& 'Hello world')
[β DEBUG π] [π Module ] ExceptionHandler_test_1.F90 [π Method ] main() [π Message] Hello world
- [[ExceptionHandler_#RaiseError]]
CALL e%raiseError(modName//"::"//myName//" - "// &
& 'Hello world')
[β ERROR β] [π Module ] ExceptionHandler_test_1.F90 [π Method ] main() [π Message] Hello world
END PROGRAM main