Browse Source

improved traceability of errors thrown in toString() methods

tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
7a1949fe2d
  1. 2
      framework/yii/mail/BaseMessage.php
  2. 2
      framework/yii/widgets/ActiveField.php

2
framework/yii/mail/BaseMessage.php

@ -45,7 +45,7 @@ abstract class BaseMessage extends Object implements MessageInterface
try { try {
return $this->toString(); return $this->toString();
} catch (\Exception $e) { } catch (\Exception $e) {
trigger_error($e->getMessage()); trigger_error($e->getMessage() . "\n\n" . $e->getTraceAsString());
return ''; return '';
} }
} }

2
framework/yii/widgets/ActiveField.php

@ -130,7 +130,7 @@ class ActiveField extends Component
try { try {
return $this->render(); return $this->render();
} catch (\Exception $e) { } catch (\Exception $e) {
trigger_error($e->getMessage()); trigger_error($e->getMessage() . "\n\n" . $e->getTraceAsString());
return ''; return '';
} }
} }

Loading…
Cancel
Save