4 use iso_fortran_env,
only: &
19 subroutine c_abort()
bind(C, name="abort")
34 character(len=*),
intent(in) :: file_name
35 integer,
intent(in) :: line_num
36 character(len=*),
intent(in) :: caller
37 character(len=*),
intent(in) :: message
39 call errout(error_unit,
'W', file_name, line_num, caller, message)
50 character(len=*),
intent(in) :: file_name
51 integer,
intent(in) :: line_num
52 character(len=*),
intent(in) :: caller
53 character(len=*),
intent(in) :: message
55 call errout(error_unit,
'F', file_name, line_num, caller, message)
66 subroutine errout(out_unit, severity, file_name, line_num, caller, message)
68 integer,
intent(in) :: out_unit
69 character(len=1),
intent(in) :: severity
70 character(len=*),
intent(in) :: file_name
71 integer,
intent(in) :: line_num
72 character(len=*),
intent(in) :: caller
73 character(len=*),
intent(in) :: message
75 character(len=64) :: line_num_str
78 select case (severity)
80 write (out_unit,
"(/10x,a)")
'*** WARNING ***'
82 write (out_unit,
"(/10x,a)")
'*** FATAL ERROR ***'
84 write (out_unit,
"(/10x,a)")
'*** FATAL ERROR ***'
85 write (out_unit,
"(/10x,a)") &
86 'Error handler (ERROUT) called with unknown severity level: ', severity
89 write (line_num_str, *) line_num
90 line_num_str = adjustl(line_num_str)
92 write (out_unit,
"(/10x,a)") &
93 'Generated by program or subroutine: '//trim(caller)
94 write (out_unit,
"(/10x,a)") &
95 'In '//trim(file_name)//
':'//trim(line_num_str)
96 write (out_unit,
"(/10x,a)") trim(message)
subroutine errout(out_unit, severity, file_name, line_num, caller, message)
Write error/warning message to a given unit.
subroutine, public sll_s_error_handler(file_name, line_num, caller, message)
Print error message to standard-error, stop execution and dump backtrace information.
subroutine, public sll_s_warning_handler(file_name, line_num, caller, message)
Print warning message to standard-error and continue execution.