wrap_json_throw_exception Subroutine

private subroutine wrap_json_throw_exception(json, msg, found)

Alternate version of json_throw_exception, where msg is kind=CDK.

Arguments

Type IntentOptional Attributes Name
class(json_core), intent(inout) :: json
character(kind=CDK, len=*), intent(in) :: msg

the error message

logical(kind=LK), intent(inout), optional :: found

if the caller is handling the exception with an optimal return argument. If so, json%stop_on_error is ignored.


Calls

proc~~wrap_json_throw_exception~~CallsGraph proc~wrap_json_throw_exception json_value_module::wrap_json_throw_exception interface~to_unicode json_string_utilities::to_unicode proc~wrap_json_throw_exception->interface~to_unicode none~throw_exception json_value_module::json_core%throw_exception proc~wrap_json_throw_exception->none~throw_exception proc~to_uni json_string_utilities::to_uni interface~to_unicode->proc~to_uni proc~to_uni_vec json_string_utilities::to_uni_vec interface~to_unicode->proc~to_uni_vec proc~json_throw_exception json_value_module::json_core%json_throw_exception none~throw_exception->proc~json_throw_exception

Source Code

    subroutine wrap_json_throw_exception(json,msg,found)

    implicit none

    class(json_core),intent(inout)  :: json
    character(kind=CDK,len=*),intent(in) :: msg    !! the error message
    logical(LK),intent(inout),optional  :: found  !! if the caller is handling the
                                                  !! exception with an optimal return
                                                  !! argument. If so, `json%stop_on_error`
                                                  !! is ignored.

    call json%throw_exception(to_unicode(msg),found)

    end subroutine wrap_json_throw_exception