diff options
author | Eric <[email protected]> | 2012-09-18 15:51:47 -0700 |
---|---|---|
committer | Eric <[email protected]> | 2012-09-18 15:51:47 -0700 |
commit | 49a45620c2c0431583969192fbefe44ee6f7850c (patch) | |
tree | 5f7624b3473797637f711bc0f345b7290b4a92b4 /include | |
parent | 79a28e0e498c4727dde2546ff83da6cb81e907e6 (diff) | |
download | relx-49a45620c2c0431583969192fbefe44ee6f7850c.tar.gz relx-49a45620c2c0431583969192fbefe44ee6f7850c.tar.bz2 relx-49a45620c2c0431583969192fbefe44ee6f7850c.zip |
make sure errors carry the name of the module that created them
This allows errors to be printed at the source
Diffstat (limited to 'include')
-rw-r--r-- | include/relcool.hrl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/relcool.hrl b/include/relcool.hrl index 732e5d3..11a0dec 100644 --- a/include/relcool.hrl +++ b/include/relcool.hrl @@ -18,3 +18,10 @@ -define(RCL_ERROR, 0). -define(RCL_INFO, 1). -define(RCL_DEBUG, 2). + +%% This is the default form of error messages for the Relcool +%% system. It is expected that everything that returns an error use +%% this and that they all expose a format_error/1 message that returns +%% an iolist. +-define(RCL_ERROR(Reason), + {error, {?MODULE, Reason}}). |