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 {
return $this->toString();
} catch (\Exception $e) {
trigger_error($e->getMessage());
trigger_error($e->getMessage() . "\n\n" . $e->getTraceAsString());
return '';
}
}

2
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 '';
}
}

Loading…
Cancel
Save