Skip to content

Commit

Permalink
Merge pull request #1743 from GEOS-ESM/bugfix/wdboggs/change_error_codes
Browse files Browse the repository at this point in the history
Update error codes to match _FAILURE macro
  • Loading branch information
mathomp4 authored Oct 18, 2022
2 parents 6d6869a + 1544866 commit ee50e8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- Error codes in `shared/MAPL_Error_Handling.F90` are now consistent with `_FAILURE = 1` in `include/MAPL_ErrLog.h`

### Removed

Expand Down
8 changes: 4 additions & 4 deletions shared/MAPL_ErrorHandling.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ module MAPL_ErrorHandlingMod
public :: MAPL_abort


public :: MAPL_UNKNOWN_ERROR
public :: MAPL_SUCCESS

public :: MAPL_UNKNOWN_ERROR
public :: MAPL_NO_SUCH_PROPERTY
public :: MAPL_NO_SUCH_VARIABLE
public :: MAPL_TYPE_MISMATCH
public :: MAPL_UNSUPPORTED_TYPE
public :: MAPL_VALUE_NOT_SUPPORTED

public :: MAPL_VALUE_NOT_SUPPORTED
public :: MAPL_NO_DEFAULT_VALUE
public :: MAPL_DUPLICATE_KEY
public :: MAPL_STRING_TOO_SHORT

enum, bind(c)
enumerator :: MAPL_UNKNOWN_ERROR = -1
enumerator :: MAPL_SUCCESS = 0

! 001-005
enumerator :: MAPL_UNKNOWN_ERROR
enumerator :: MAPL_NO_SUCH_PROPERTY
enumerator :: MAPL_NO_SUCH_VARIABLE
enumerator :: MAPL_TYPE_MISMATCH
enumerator :: MAPL_UNSUPPORTED_TYPE
enumerator :: MAPL_VALUE_NOT_SUPPORTED

! 006-010
enumerator :: MAPL_VALUE_NOT_SUPPORTED
enumerator :: MAPL_NO_DEFAULT_VALUE
enumerator :: MAPL_DUPLICATE_KEY
enumerator :: MAPL_STRING_TOO_SHORT
Expand Down

0 comments on commit ee50e8c

Please sign in to comment.