SICOPOLIS V5-dev  Revision 1264
error_m.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Module : e r r o r _ m
4 !
5 !> @file
6 !!
7 !! Writing of error messages and stopping execution.
8 !!
9 !! @section Copyright
10 !!
11 !! Copyright 2009-2018 Ralf Greve
12 !!
13 !! @section License
14 !!
15 !! This file is part of SICOPOLIS.
16 !!
17 !! SICOPOLIS is free software: you can redistribute it and/or modify
18 !! it under the terms of the GNU General Public License as published by
19 !! the Free Software Foundation, either version 3 of the License, or
20 !! (at your option) any later version.
21 !!
22 !! SICOPOLIS is distributed in the hope that it will be useful,
23 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
24 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 !! GNU General Public License for more details.
26 !!
27 !! You should have received a copy of the GNU General Public License
28 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
29 !<
30 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31 
32 !-------------------------------------------------------------------------------
33 !> Writing of error messages and stopping execution.
34 !<------------------------------------------------------------------------------
35 module error_m
36 
37  implicit none
38 
39  public
40 
41 contains
42 
43 !-------------------------------------------------------------------------------
44 !> Main routine of error_m: Writing of error messages and stopping execution.
45 !<------------------------------------------------------------------------------
46  subroutine error(error_message)
47 
48  implicit none
49 
50  character(len=256), intent(in) :: error_message
51 
52  write(6, fmt='(a)') trim(error_message)
53 
54 #ifndef ALLOW_OPENAD /* Normal */
55  stop
56 #endif /* Normal */
57 
58  end subroutine error
59 
60 !-------------------------------------------------------------------------------
61 
62 end module error_m
63 !
subroutine error(error_message)
Main routine of error_m: Writing of error messages and stopping execution.
Definition: error_m.F90:47
Writing of error messages and stopping execution.
Definition: error_m.F90:35