throw Subroutine

public subroutine throw(file_name, line_number, message)

Uses

    • pFUnit
  • proc~~throw~~UsesGraph proc~throw throw pFUnit pFUnit proc~throw->pFUnit

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: file_name
integer, intent(in) :: line_number
character(len=*), intent(in), optional :: message

Calls

proc~~throw~~CallsGraph proc~throw throw pfunit_throw pfunit_throw proc~throw->pfunit_throw sourcelocation sourcelocation proc~throw->sourcelocation

Source Code

   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