New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
mod_error_msg.f90 in branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/EXTERNAL/XMLIO_SERVER/src/XMLIO – NEMO

source: branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/EXTERNAL/XMLIO_SERVER/src/XMLIO/mod_error_msg.f90 @ 4660

Last change on this file since 4660 was 4660, checked in by timgraham, 10 years ago

Fixes described in ticket #1302 to XMLIO
Added in an error message in subroutine mod_context.f90
Changed mod_error_msg.f90 so that it prints "Error" instead of "Warning" before stopping.

  • Property svn:keywords set to Id
File size: 862 bytes
Line 
1MODULE error_msg
2  USE mod_xmlio_parameters,ONLY : str_msg_len
3
4  CHARACTER(LEN=str_msg_len),SAVE :: message
5
6CONTAINS
7
8  SUBROUTINE Warning(sub_name)
9  IMPLICIT NONE
10    CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: sub_name
11   
12    IF (PRESENT(sub_name)) THEN
13      PRINT *,"--* WARNING *-- : in subroutine "//sub_name
14    ELSE
15      PRINT *,"--* WARNING *-- "
16    ENDIF
17   
18    PRINT *,"----> ",TRIM(message)
19    message=REPEAT(' ',str_msg_len)
20   
21  END SUBROUTINE warning
22 
23  SUBROUTINE error(sub_name)
24  IMPLICIT NONE
25    CHARACTER(LEN=*), INTENT(IN), OPTIONAL :: sub_name
26   
27    IF (PRESENT(sub_name)) THEN
28      PRINT *,"--* ERROR *-- : in subroutine "//sub_name
29    ELSE
30      PRINT *,"--* ERROR *-- "
31    ENDIF
32
33    PRINT *,"----> ",TRIM(message)
34    message=REPEAT(' ',str_msg_len)
35   
36    STOP
37 
38  END SUBROUTINE error   
39
40END MODULE error_msg
Note: See TracBrowser for help on using the repository browser.