FatalError.f90 Source File

Provides error message subroutine


Files dependent on this one

sourcefile~~fatalerror.f90~~AfferentGraph sourcefile~fatalerror.f90 FatalError.f90 sourcefile~anglemod.f90 angleMod.f90 sourcefile~anglemod.f90->sourcefile~fatalerror.f90 sourcefile~sourcereceiverpositions.f90 SourceReceiverPositions.f90 sourcefile~anglemod.f90->sourcefile~sourcereceiverpositions.f90 sourcefile~attenmod.f90 AttenMod.f90 sourcefile~attenmod.f90->sourcefile~fatalerror.f90 sourcefile~bdry3dmod.f90 bdry3DMod.f90 sourcefile~bdry3dmod.f90->sourcefile~fatalerror.f90 sourcefile~bdrymod.f90 bdryMod.f90 sourcefile~bdrymod.f90->sourcefile~fatalerror.f90 sourcefile~beampattern.f90 beampattern.f90 sourcefile~beampattern.f90->sourcefile~fatalerror.f90 sourcefile~bellhop.f90 bellhop.f90 sourcefile~bellhop.f90->sourcefile~fatalerror.f90 sourcefile~bellhop.f90->sourcefile~anglemod.f90 sourcefile~bellhop.f90->sourcefile~attenmod.f90 sourcefile~bellhop.f90->sourcefile~bdrymod.f90 sourcefile~bellhop.f90->sourcefile~beampattern.f90 sourcefile~readenvironmentbell.f90 ReadEnvironmentBell.f90 sourcefile~bellhop.f90->sourcefile~readenvironmentbell.f90 sourcefile~refcoef.f90 RefCoef.f90 sourcefile~bellhop.f90->sourcefile~refcoef.f90 sourcefile~bellhop.f90->sourcefile~sourcereceiverpositions.f90 sourcefile~sspmod.f90 sspMod.f90 sourcefile~bellhop.f90->sourcefile~sspmod.f90 sourcefile~influence.f90 influence.f90 sourcefile~bellhop.f90->sourcefile~influence.f90 sourcefile~step.f90 Step.f90 sourcefile~bellhop.f90->sourcefile~step.f90 sourcefile~writeray.f90 WriteRay.f90 sourcefile~bellhop.f90->sourcefile~writeray.f90 sourcefile~bellhop3d.f90 bellhop3D.f90 sourcefile~bellhop3d.f90->sourcefile~fatalerror.f90 sourcefile~bellhop3d.f90->sourcefile~anglemod.f90 sourcefile~bellhop3d.f90->sourcefile~bdry3dmod.f90 sourcefile~bellhop3d.f90->sourcefile~beampattern.f90 sourcefile~bellhop3d.f90->sourcefile~readenvironmentbell.f90 sourcefile~bellhop3d.f90->sourcefile~refcoef.f90 sourcefile~bellhop3d.f90->sourcefile~sourcereceiverpositions.f90 sourcefile~bellhop3d.f90->sourcefile~sspmod.f90 sourcefile~bellhop3d.f90->sourcefile~influence.f90 sourcefile~influence3d.f90 influence3D.f90 sourcefile~bellhop3d.f90->sourcefile~influence3d.f90 sourcefile~reflect3dmod.f90 Reflect3DMod.f90 sourcefile~bellhop3d.f90->sourcefile~reflect3dmod.f90 sourcefile~reflectmod.f90 ReflectMod.f90 sourcefile~bellhop3d.f90->sourcefile~reflectmod.f90 sourcefile~step3dmod.f90 Step3DMod.f90 sourcefile~bellhop3d.f90->sourcefile~step3dmod.f90 sourcefile~bellhop3d.f90->sourcefile~writeray.f90 sourcefile~readenvironmentbell.f90->sourcefile~fatalerror.f90 sourcefile~readenvironmentbell.f90->sourcefile~anglemod.f90 sourcefile~readenvironmentbell.f90->sourcefile~attenmod.f90 sourcefile~readenvironmentbell.f90->sourcefile~bdrymod.f90 sourcefile~rwshdfile.f90 RWSHDFile.f90 sourcefile~readenvironmentbell.f90->sourcefile~rwshdfile.f90 sourcefile~readenvironmentbell.f90->sourcefile~sourcereceiverpositions.f90 sourcefile~readenvironmentbell.f90->sourcefile~sspmod.f90 sourcefile~refcoef.f90->sourcefile~fatalerror.f90 sourcefile~rwshdfile.f90->sourcefile~fatalerror.f90 sourcefile~rwshdfile.f90->sourcefile~sourcereceiverpositions.f90 sourcefile~sourcereceiverpositions.f90->sourcefile~fatalerror.f90 sourcefile~sspmod.f90->sourcefile~fatalerror.f90 sourcefile~sspmod.f90->sourcefile~attenmod.f90 sourcefile~influence.f90->sourcefile~sourcereceiverpositions.f90 sourcefile~influence.f90->sourcefile~sspmod.f90 sourcefile~influence.f90->sourcefile~writeray.f90 sourcefile~influence3d.f90->sourcefile~sourcereceiverpositions.f90 sourcefile~influence3d.f90->sourcefile~sspmod.f90 sourcefile~influence3d.f90->sourcefile~writeray.f90 sourcefile~reflect3dmod.f90->sourcefile~refcoef.f90 sourcefile~reflect3dmod.f90->sourcefile~sspmod.f90 sourcefile~reflectmod.f90->sourcefile~refcoef.f90 sourcefile~reflectmod.f90->sourcefile~sspmod.f90 sourcefile~step.f90->sourcefile~bdrymod.f90 sourcefile~step.f90->sourcefile~sspmod.f90 sourcefile~step3dmod.f90->sourcefile~bdry3dmod.f90 sourcefile~step3dmod.f90->sourcefile~sspmod.f90 sourcefile~writeray.f90->sourcefile~sspmod.f90

Source Code

!! Provides error message subroutine

MODULE FatalError
!! Provides `ERROUT` error message

  IMPLICIT NONE
  PUBLIC

  INTEGER, PRIVATE :: PRTFile = 6

CONTAINS

  SUBROUTINE ERROUT( WHERE, ErrMsg )
  !! Outputs error message and terminates program

    ! Arguments
    CHARACTER (LEN=*), INTENT( IN ) :: WHERE
        !! Program or subroutine the error is being called from
    CHARACTER (LEN=*), INTENT( IN ) :: ErrMsg
        !! The error message itself

    INTEGER   :: Last

    WRITE( PRTFile, * )
    WRITE( PRTFile, * ) '*** FATAL ERROR ***'

    Last = LEN( WHERE )
    WRITE( PRTFile, * ) 'Generated by program or subroutine: ', WHERE( 1 : Last )

    Last = LEN( ErrMsg )
    WRITE( PRTFile, * ) ErrMsg( 1 : Last )
    WRITE( PRTFile, * )
    CLOSE( PRTFile )

    ! Intel Fortran can't handle the following
    ! ERROR STOP 'Fatal Error in ' // WHERE( 1 : Last1 ) // ': ' // ErrMsg( 1 : Last2 )
    ERROR STOP 'Fatal Error: Check the print file for details'

  END SUBROUTINE ERROUT

END MODULE FatalError