ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_err::setAsserted Interface Reference

Verify the input assertion holds and if it does not, print the (optional) input message on stdout and halt the program via error stop or (optionally) return the program control to the caller routine, if requested.
More...

Detailed Description

Verify the input assertion holds and if it does not, print the (optional) input message on stdout and halt the program via error stop or (optionally) return the program control to the caller routine, if requested.

The procedures under this generic interface are meant to be used primarily within the ParaMonte library routines to verify the runtime conditions that must hold when the library procedures are called by the end-user.

Parameters
[in]assertion: The input scalar logical of kind any supported by the processor (e.g., LK). If .true. it means that the desired condition holds.
Otherwise, the program halts by calling error stop unless renabled = .true..
[in]msg: The input scalar character of default kind SK containing a descriptive message of the condition that must hold that leads to assertion = .true..
If present, the message if printed out on the output unit output_unit before halting the program (or returning the control to the caller).
(optional, default = "")
[in]renabled: The input scalar logical of default kind LK. If .true., the program-control will be returned to the calling routine instead of terminating the program via error stop.
This capability is particularly needed during the testing of the various components of the ParaMonte library, when fatal error must be handled gracefully.
(optional, default = .false.)


Possible calling interfaces

use pm_err, only: setAsserted
call setAsserted(assertion, msg = msg, renabled = renabled)
Verify the input assertion holds and if it does not, print the (optional) input message on stdout and...
Definition: pm_err.F90:735
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
Remarks
The procedures under discussion are impure.
See also
getStr
setNoted
setWarned
setAborted
setAsserted
getLine

test_pm_err


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Todo:
Normal Priority: Adding an example usage to this interface can be helpful.
Author:
Amir Shahmoradi, 3:43 AM Friday, March 1, 2013, Institute for Fusion Studies, The University of Texas at Austin

Definition at line 735 of file pm_err.F90.


The documentation for this interface was generated from the following file: