MAPL_pFUnit_Throw.F90 Source File


Files dependent on this one

sourcefile~~mapl_pfunit_throw.f90~~AfferentGraph sourcefile~mapl_pfunit_throw.f90 MAPL_pFUnit_Throw.F90 sourcefile~init_tests.f90 init_tests.F90 sourcefile~init_tests.f90->sourcefile~mapl_pfunit_throw.f90 sourcefile~mapl_initialize.f90 MAPL_Initialize.F90 sourcefile~mapl_initialize.f90->sourcefile~mapl_pfunit_throw.f90

Source Code

module MAPL_pFUnit_ThrowMod
   implicit none
   private

   public :: throw

contains

   subroutine throw(file_name, line_number, message)
      use pFUnit, only: SourceLocation
      use pFUnit, only: pFUnit_throw => throw
      character(len=*), intent(in) :: file_name
      integer, intent(in) :: line_number
      character(len=*), optional, intent(in) :: message

      character(len=:), allocatable :: message_

      if (present(message)) then
         message_ = message
      else
         message_ = '<no message>'
      end if
      call pFUnit_throw(message_, SourceLocation(file_name, line_number))

   end subroutine throw
   
end module MAPL_pFUnit_ThrowMod