json_print_error_message Subroutine

public subroutine json_print_error_message(io_unit)

Arguments

Type IntentOptional AttributesName
integer, intent(in), optional :: io_unit

Description

Print any error message, and then clear the exceptions.

Calls

proc~~json_print_error_message~~CallsGraph proc~json_print_error_message json_print_error_message proc~json_check_for_errors json_check_for_errors proc~json_print_error_message->proc~json_check_for_errors proc~json_clear_exceptions json_clear_exceptions proc~json_print_error_message->proc~json_clear_exceptions
Help

Called By

proc~~json_print_error_message~~CalledByGraph proc~json_print_error_message json_print_error_message proc~test_7 test_7 proc~test_7->proc~json_print_error_message proc~test_9 test_9 proc~test_9->proc~json_print_error_message proc~test_2 test_2 proc~test_2->proc~json_print_error_message proc~add_variables_to_input add_variables_to_input proc~test_2->proc~add_variables_to_input none~check_errors check_errors none~check_errors->proc~json_print_error_message proc~test_3 test_3 proc~test_3->proc~json_print_error_message proc~test_8 test_8 proc~test_8->proc~json_print_error_message proc~test_13 test_13 proc~test_13->proc~json_print_error_message proc~add_variables_to_input->proc~json_print_error_message proc~test_1 test_1 proc~test_1->proc~json_print_error_message proc~test_10 test_10 proc~test_10->proc~json_print_error_message proc~test_5 test_5 proc~test_5->proc~json_print_error_message proc~test_14 test_14 proc~test_14->proc~json_print_error_message proc~test_6 test_6 proc~test_6->proc~json_print_error_message proc~test_11 test_11 proc~test_11->proc~json_print_error_message proc~test_4 test_4 proc~test_4->proc~json_print_error_message program~jf_test_7 jf_test_7 program~jf_test_7->proc~test_7 program~jf_test_9 jf_test_9 program~jf_test_9->proc~test_9 program~jf_test_2 jf_test_2 program~jf_test_2->proc~test_2 proc~test_12 test_12 proc~test_12->none~check_errors program~jf_test_12 jf_test_12 program~jf_test_12->proc~test_12 program~jf_test_3 jf_test_3 program~jf_test_3->proc~test_3 program~jf_test_8 jf_test_8 program~jf_test_8->proc~test_8 program~jf_test_13 jf_test_13 program~jf_test_13->proc~test_13 program~jf_test_1 jf_test_1 program~jf_test_1->proc~test_1 program~jf_test_10 jf_test_10 program~jf_test_10->proc~test_10 program~jf_test_5 jf_test_5 program~jf_test_5->proc~test_5 program~jf_test_14 jf_test_14 program~jf_test_14->proc~test_14 program~jf_test_6 jf_test_6 program~jf_test_6->proc~test_6 program~jf_test_11 jf_test_11 program~jf_test_11->proc~test_11 program~jf_test_4 jf_test_4 program~jf_test_4->proc~test_4
Help

Variables

TypeVisibility AttributesNameInitial
character(kind=CK,len=:), public, allocatable:: error_msg
logical, public :: status_ok

Source Code

    subroutine json_print_error_message(io_unit)

    implicit none

    integer, intent(in), optional :: io_unit

    character(kind=CK,len=:),allocatable :: error_msg
    logical :: status_ok

    !get error message:
    call json_check_for_errors(status_ok, error_msg)

    !print it if there is one:
    if (.not. status_ok) then
        if (present(io_unit)) then
            write(io_unit,'(A)') error_msg
        else
            write(*,'(A)') error_msg
        end if
        deallocate(error_msg)
        call json_clear_exceptions()
    end if

    end subroutine json_print_error_message