-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ListModule): trim dependencies, add defaults, add docstrings (…
…#1484) * add/format docstrings for ListType type-bound procedures * add default equality predicate associated(x, y) for ListType%ContainsObject * just print programmer errors instead of using sim_message() in ArrayHandlersModule * move/refactor stop_with_error() -> ErrorUtilModule pstop()... avoid sim-related dependencies
- Loading branch information
Showing
19 changed files
with
137 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module ErrorUtilModule | ||
use KindModule, only: I4B | ||
implicit none | ||
contains | ||
|
||
!> @brief Stop the program, optionally specifying an error status code. | ||
!! | ||
!! If a non-zero status is specified, the program is terminated with the | ||
!! error status code. If no status is specified or status=0, the program | ||
!! stops with code 0. A message may be provided to print before exiting, | ||
!! useful e.g. for "contact developer" messages upon programming errors. | ||
!< | ||
subroutine pstop(status, message) | ||
integer(I4B), intent(in), optional :: status !< optional error code to return (default=0) | ||
character(len=*), intent(in), optional :: message !< optional message to print before stopping | ||
|
||
if (present(message)) print *, message | ||
if (present(status)) then | ||
if (status == 0) stop | ||
call exit(status) | ||
else | ||
stop | ||
end if | ||
end subroutine pstop | ||
|
||
end module ErrorUtilModule |
Oops, something went wrong.