summaryrefslogtreecommitdiff
path: root/it_debug.class
diff options
context:
space:
mode:
authorUrban Müller2011-09-06 16:51:23 +0000
committerUrban Müller2011-09-06 16:51:23 +0000
commitbb113f3bc0d451fa33af8b4ea9635d08e6df91a0 (patch)
tree5c8950a3ae1195d7226876cff11c06273a1a7ed2 /it_debug.class
parentef285366954231a28bff1428b5f71c4e284dd46d (diff)
downloaditools-bb113f3bc0d451fa33af8b4ea9635d08e6df91a0.tar.gz
itools-bb113f3bc0d451fa33af8b4ea9635d08e6df91a0.tar.bz2
itools-bb113f3bc0d451fa33af8b4ea9635d08e6df91a0.zip
print err if stackdump not possible
Diffstat (limited to 'it_debug.class')
-rw-r--r--it_debug.class4
1 files changed, 3 insertions, 1 deletions
diff --git a/it_debug.class b/it_debug.class
index 2ccf734..0b14cc7 100644
--- a/it_debug.class
+++ b/it_debug.class
@@ -182,7 +182,9 @@ function backtrace($p = array())
$p += array('levels' => 0, 'skiplevels'=> 0, 'skipfiles' => "###");
- if (!function_exists('memory_get_usage') || (memory_get_usage() < 50000000))
+ if (function_exists('memory_get_usage') && (memory_get_usage() > 50000000))
+ $result = array("[mem usage too high]");
+ else
{
foreach (array_slice(debug_backtrace(), $p['skiplevels'] + 1) as $call)
{