dev:error_handling
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:error_handling [2015/10/02 11:24] – [Error Handling] vondele | dev:error_handling [2025/03/08 13:41] (current) – oschuett | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Error Handling ====== | ====== Error Handling ====== | ||
- | In CP2K there exist three convenient macros for error handling. They are defined in [[src>cp2k/src/common/cp_common_uses.f90]], and are therefore always available. However, these macros can only be used for **short messages** (approximately less than 7 words), because of Fortran' | + | In CP2K there exist three convenient macros for error handling. They are defined in [[src> |
<code Fortran> | <code Fortran> | ||
| | ||
| | ||
- | | + | |
</ | </ | ||
For longer messages one can use these two routines: | For longer messages one can use these two routines: | ||
<code Fortran> | <code Fortran> | ||
- | CALL cp_warn(__LOCATION__," | + | CALL cp_warn(__LOCATION__," |
- | "which can span multiple lines and contains "\\& | + | "which can span multiple lines and contains "//& |
"some valuable advice for the user." | "some valuable advice for the user." | ||
- | CALL cp_abort(__LOCATION__," | + | CALL cp_abort(__LOCATION__," |
- | " | + | " |
</ | </ | ||
- | cp_warn and CPWARN | + | <note important> |
+ | Messages from '' | ||
+ | </ | ||
===== Cheat Sheet ===== | ===== Cheat Sheet ===== |
dev/error_handling.1443785071.txt.gz · Last modified: 2020/08/21 10:14 (external edit)