golem is hosted by Hepforge, IPPP Durham

src/module/sortie_erreur [ Modules ]

[ Top ] [ Modules ]

NAME

  Module sortie_erreur

USAGE

  use sortie_erreur

DESCRIPTION

  This module is used to generate error exception or to print some information from
  a function/subroutine

OUTPUT

  This module exports:
  * erreur -- derived type
  * tab_erreur_par -- an array of 7 derived type erreur
  * catch_exception -- a subroutine to perform an action depending on the level
  * print_type -- a subroutine to print the type erreur

USES

  * precision_golem (src/module/precision_golem.f90)
  * parametre (src/module/parametre.f90)
  * array (src/module/array.f90)

src/module/sortie_erreur/catch_exception [ Functions ]

[ Top ] [ Functions ]

NAME

  Subroutine catch_exception

USAGE

  call catch_exception(level)

DESCRIPTION

  For the error exception
  This routine prints on the unit 0 (stderr for fortran)  
  the array tab_erreur_par 

INPUTS

  * level -- a integer : 0 the program stops, 1 warning, 2 info

SIDE EFFECTS

  No side effect

RETURN VALUE

  write on the unit 0 (stderr for fortran) : level=0,1
  or write on the unit 12 : level=2 

EXAMPLE


src/module/sortie_erreur/erreur [ Types ]

[ Top ] [ Types ]

NAME

   erreur -- derived type, to print error/info 

SYNOPSIS

  !   type erreur

SOURCE

  type erreur
    !
    character(len=256) :: chaine
    logical :: a_imprimer = .false.
    integer :: arg_int
    real(ki) :: arg_real
    complex(ki) :: arg_comp
    character(len=32) :: arg_char
    integer, dimension(2) :: arg_int_tab
    !
  end type erreur

NOTES

   * set erreur%a_imprimer = .true. to print it
   * arg_in_tab(1) : packb(tab), arg_int_tab(2) : size(tab)