![]() |
Error handling routines. More...
Functions/Subroutines | |
subroutine, private | write_header () |
Write the header of the standard output (usually OUT) More... | |
subroutine, public | write_final_stats_rate_creation |
Write the final stats for rate creation. More... | |
subroutine, public | write_data_to_std_out (str_msg, value_str, unit) |
Write data to the standard output (usually OUT) More... | |
integer function, public | str_to_int (input_string) |
Converts a string to an integer. More... | |
real(r_kind) function, public | str_to_float (input_string) |
Converts a string to a float. More... | |
character(:) function, allocatable, public | num_to_str (num) |
Converts a given real to a string with format "(1pE10.2)". More... | |
character(:) function, allocatable, public | int_to_str (num) |
Converts a given integer to a string. More... | |
subroutine, public | raise_exception (msg, sub, error_code) |
Raise a exception with a given error message. More... | |
Variables | |
integer, parameter | error_id =0 |
Default standard error unit in fortran. More... | |
logical, private | write_header_init =.True. |
Init flag for write_data_to_std_out. More... | |
logical, public | data_creation_mode =.False. |
Flag for rate creation mode. More... | |
Error handling routines.
Edited:
character(:) function, allocatable, public error_msg_class::int_to_str | ( | integer, intent(in) | num | ) |
Converts a given integer to a string.
This function is often used in error messages as it is useful to convert a number to a string in the message directly.
[in] | num | Input integer |
Definition at line 223 of file error_msg_class.f90.
character(:) function, allocatable, public error_msg_class::num_to_str | ( | real(r_kind), intent(in) | num | ) |
Converts a given real to a string with format "(1pE10.2)".
This function is often used in error messages as it is useful to convert a number to a string in the message directly
[in] | num | Input float |
Definition at line 204 of file error_msg_class.f90.
subroutine, public error_msg_class::raise_exception | ( | character(len=*), intent(in) | msg, |
character(len=*), intent(in), optional | sub, | ||
integer, intent(in), optional | error_code | ||
) |
Raise a exception with a given error message.
This subroutine is called when some inconsistency occured. It prints a message to the OUT file that an error occured and prints the rest to the standard error unit (usually file ERR in WinNet). This subroutine also terminates the program.
[in] | msg | Error message |
[in] | sub | in which subroutine [opt] |
[in] | error_code | Errorcode, see Error codes |
Definition at line 244 of file error_msg_class.f90.
real(r_kind) function, public error_msg_class::str_to_float | ( | character(len=*), intent(in) | input_string | ) |
Converts a string to a float.
If the string is not a valid integer, an error message is raised.
[in] | input_string | String from param file |
Definition at line 178 of file error_msg_class.f90.
integer function, public error_msg_class::str_to_int | ( | character(len=*), intent(in) | input_string | ) |
Converts a string to an integer.
If the string is not a valid integer, an error message is raised.
[in] | input_string | String from param file |
Definition at line 154 of file error_msg_class.f90.
subroutine, public error_msg_class::write_data_to_std_out | ( | character(len=*), intent(in) | str_msg, |
character(len=*), intent(in) | value_str, | ||
character(len=*), intent(in), optional | unit | ||
) |
Write data to the standard output (usually OUT)
This subroutine formats the output to a uniform design. an example line is:
Network size : 6545
[in] | str_msg | Message oriented to the left |
[in] | value_str | Value represented as a string |
[in] | unit | unit string |
Definition at line 121 of file error_msg_class.f90.
subroutine, public error_msg_class::write_final_stats_rate_creation |
Write the final stats for rate creation.
This subroutine writes the final stats when only creating a folder with prepared binary data.
Definition at line 97 of file error_msg_class.f90.
|
private |
Write the header of the standard output (usually OUT)
This subroutine writes the first header of the out file. This looks e.g., like:
WinNet - Nuclear reaction network
Option : Value Unit --------------------------------------------------------------
Edited:
Definition at line 51 of file error_msg_class.f90.
logical, public error_msg_class::data_creation_mode =.False. |
Flag for rate creation mode.
Definition at line 23 of file error_msg_class.f90.
|
private |
Default standard error unit in fortran.
Definition at line 20 of file error_msg_class.f90.
|
private |
Init flag for write_data_to_std_out.
Definition at line 22 of file error_msg_class.f90.