From 7a1949fe2d789eceb1a90a041e70e5acfe7e3f45 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 1 Jan 2014 17:11:48 +0100 Subject: [PATCH] improved traceability of errors thrown in toString() methods --- framework/yii/mail/BaseMessage.php | 2 +- framework/yii/widgets/ActiveField.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/yii/mail/BaseMessage.php b/framework/yii/mail/BaseMessage.php index d2594fc..36d3288 100644 --- a/framework/yii/mail/BaseMessage.php +++ b/framework/yii/mail/BaseMessage.php @@ -45,7 +45,7 @@ abstract class BaseMessage extends Object implements MessageInterface try { return $this->toString(); } catch (\Exception $e) { - trigger_error($e->getMessage()); + trigger_error($e->getMessage() . "\n\n" . $e->getTraceAsString()); return ''; } } diff --git a/framework/yii/widgets/ActiveField.php b/framework/yii/widgets/ActiveField.php index 63bce96..b46064a 100644 --- a/framework/yii/widgets/ActiveField.php +++ b/framework/yii/widgets/ActiveField.php @@ -130,7 +130,7 @@ class ActiveField extends Component try { return $this->render(); } catch (\Exception $e) { - trigger_error($e->getMessage()); + trigger_error($e->getMessage() . "\n\n" . $e->getTraceAsString()); return ''; } }