json_file_check_for_errors Subroutine

private subroutine json_file_check_for_errors(me, status_ok, error_msg)

Retrieve error status and message from the class.

Type Bound

json_file

Arguments

Type IntentOptional Attributes Name
class(json_file), intent(inout) :: me
logical(kind=LK), intent(out), optional :: status_ok

true if there were no errors

character(kind=CK, len=:), intent(out), optional, allocatable :: error_msg

the error message (if there were errors)


Calls

proc~~json_file_check_for_errors~~CallsGraph proc~json_file_check_for_errors json_file%json_file_check_for_errors proc~json_check_for_errors json_core%json_check_for_errors proc~json_file_check_for_errors->proc~json_check_for_errors

Source Code

    subroutine json_file_check_for_errors(me,status_ok,error_msg)

    implicit none

    class(json_file),intent(inout) :: me
    logical(LK),intent(out),optional :: status_ok !! true if there were no errors
    character(kind=CK,len=:),allocatable,intent(out),optional :: error_msg !! the error message
                                                                           !! (if there were errors)

#if defined __GFORTRAN__
    character(kind=CK,len=:),allocatable :: tmp  !! workaround for gfortran bugs
    call me%core%check_for_errors(status_ok,tmp)
    if (present(error_msg)) error_msg = tmp
#else
    call me%core%check_for_errors(status_ok,error_msg)
#endif

    end subroutine json_file_check_for_errors