Logical function to indicate if an exception has been thrown.
type(json_file) :: json logical :: status_ok character(len=:),allocatable :: error_msg call json%load_file(filename='myfile.json') if (json_failed()) then call json_check_for_errors(status_ok, error_msg) write(*,*) 'Error: '//error_msg call json_clear_exceptions() call json%destroy() end if
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module using it.
Solid arrows point from one derived type to another which extends (inherits from) it. Dashed arrows point from a derived type to another type containing it as a components, with a label listing the name(s) of said component(s).
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
function json_failed() result(failed)
implicit none
logical(LK) :: failed
failed = exception_thrown
end function json_failed