! GeErrorMessage.f90 ! ! Error handling routine. All errors and warnings are ! piped through this routine. This is the only place ! where the execution may get stopped. Module 'genesis_m' ! contains an explicit interface to this routine. ! ! Detlef Irmscher, Thomas Ullrich, Uni Heidelberg, September 1993 ! Last update: 16.3.95 tu ! subroutine GeErrorMessage(routine, message, rc, fatal) implicit none character(len=*) :: routine , message character(len=10) :: chrc integer, optional :: rc logical, optional :: fatal if (present(rc)) then write(chrc,fmt='(i4)') rc chrc = adjustl(chrc) print "(a,'::',1x,a,1x,'(',a,')')", & trim(routine), trim(message), trim(chrc) else print "(a,'::',1x,a)", & trim(routine), trim(message) endif if (present(fatal)) then if (fatal) stop endif end subroutine GeErrorMessage