Problem/Motivation
Steps to reproduce
As part of #2932518: Deprecate watchdog_exception we want to deprecate watchdog_exception. In order to make the deprecation and transition easier, we want to add a constant to 9.4.x.
Proposed resolution
Add a constant for the error message.
Remaining tasks
User interface changes
API changes
The constant Drupal\Core\Utility\Error::DEFAULT_ERROR_MESSAGE has been added to Drupal. It has the value: '%type: @message in %function (line %line of %file).'.
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3260044-2.patch | 8.8 KB | kim.pepper |
Comments
Comment #2
kim.pepperInitial patch.
Comment #3
kim.pepperHopefully this is something that can be backported before 10.0.x
Comment #4
andypostLooks good to go, maybe it needs CR but let''s get commiters' feedback to unblock #2932518: Deprecate watchdog_exception
Comment #5
daffie commentedAll code changes look good to me.
I have updated the IS and added a CR.
+1 for RTBC.
Comment #6
mfbCould/should the constant also be used here in _drupal_log_error():
It would mean an extra period is added in before @backtrace_string which seems fine (the reader should take a breath before reading the backtrace :)
Ideas for future enhancement: Add a constant that includes
<pre class="backtrace">@backtrace</pre>or<pre class="backtrace">@backtrace_string</pre>and standardize on one of those tokens being used for the backtrace string everywhere?Comment #7
kim.pepperI think we should keep the scope of this issue small to just focus on exact replacements.
I've created a follow-up #3260986: Add a constant for watchdog_exception message with a backtrace
Comment #8
alexpottCommitted and pushed 0415f597980 to 10.0.x and 8ea4547127a to 9.4.x. Thanks!