aboutsummaryrefslogtreecommitdiff
path: root/Carpet
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-03-19 14:02:15 -0500
committerErik Schnetter <schnetter@cct.lsu.edu>2008-03-19 14:02:15 -0500
commit315da175d4fa2ac1143b99ea7d9ef912bc47c75d (patch)
treee92bad61705b18e05ab3a378b30937210813673e /Carpet
parent78c6307649d812cd12033ca1fe4de23f29b2ecdb (diff)
CarpetLib: Output type information in bbox error messages
Diffstat (limited to 'Carpet')
-rw-r--r--Carpet/CarpetLib/src/bbox.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/Carpet/CarpetLib/src/bbox.cc b/Carpet/CarpetLib/src/bbox.cc
index 97a8641ef..214f26a66 100644
--- a/Carpet/CarpetLib/src/bbox.cc
+++ b/Carpet/CarpetLib/src/bbox.cc
@@ -2,6 +2,7 @@
#include <cassert>
#include <iostream>
#include <limits>
+#include <typeinfo>
#include "cctk.h"
@@ -27,8 +28,9 @@ void bbox<T,D>::assert_bbox_limits () const
any (_upper >= numeric_limits<T>::max() / 2) or
any (_upper <= numeric_limits<T>::min() / 2))
{
- CCTK_WARN (CCTK_WARN_ABORT,
- "Tried to create a very large bbox -- it is likely that this would lead to an integer overflow");
+ CCTK_VWarn (CCTK_WARN_ABORT, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Tried to create a very large bbox of type %s -- it is likely that this would lead to an integer overflow",
+ typeid(*this).name());
}
}
}
@@ -46,8 +48,9 @@ typename bbox<T,D>::size_type bbox<T,D>::size () const {
size_type sz = 1, max = numeric_limits<size_type>::max();
for (int d=0; d<D; ++d) {
if (sh[d] > max) {
- CCTK_WARN (CCTK_WARN_ABORT,
- "bbox size is too large -- integer overflow");
+ CCTK_VWarn (CCTK_WARN_ABORT, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "size of bbox of type %s is too large -- integer overflow",
+ typeid(*this).name());
}
sz *= sh[d];
max /= sh[d];