diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 21:13:43 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-04-12 21:13:43 +0000 |
commit | 11c2b9bbc790216eeb22a1e4d4de8161394c3fbf (patch) | |
tree | f1233ffb2dcdb2d0ae2e5976fa173c9ab4129475 | |
parent | b9e19e076662ae5743b9c81eb238fe11204f6dbd (diff) | |
download | dimension-11c2b9bbc790216eeb22a1e4d4de8161394c3fbf.tar.xz |
Use Dimension::SEVERITY_* rather than DMNSN_SEVERITY for calling
dmnsn_error from C++.
-rw-r--r-- | libdimension/dimension/error.h | 5 | ||||
-rw-r--r-- | libdimensionxx/png.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libdimension/dimension/error.h b/libdimension/dimension/error.h index 858ff96..3204cb2 100644 --- a/libdimension/dimension/error.h +++ b/libdimension/dimension/error.h @@ -32,8 +32,9 @@ typedef enum { } dmnsn_severity; /* Use this to report an error */ -#define dmnsn_error(severity, str) \ - dmnsn_report_error(severity, __PRETTY_FUNCTION__, __LINE__, str) +#define dmnsn_error(severity, str) \ + dmnsn_report_error((dmnsn_severity)severity, __PRETTY_FUNCTION__, __LINE__, \ + str) /* Called by dmnsn_error() - don't call directly */ void dmnsn_report_error(dmnsn_severity severity, diff --git a/libdimensionxx/png.cpp b/libdimensionxx/png.cpp index 348b7a7..cd4925e 100644 --- a/libdimensionxx/png.cpp +++ b/libdimensionxx/png.cpp @@ -34,7 +34,7 @@ namespace Dimension try { write(); } catch (...) { - dmnsn_error(DMNSN_SEVERITY_MEDIUM, + dmnsn_error(SEVERITY_MEDIUM, "Writing canvas to PNG failed in PNG_Canvas destructor."); } } |