uefi-services: Change panic handler log message. #526
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The panic handler now displays its log message using
println!
instead oferror!
. The message prefix is altered from [ERROR] to [PANIC]. The extraneous filename and line number printed byerror!
are also removed from the log message.Previously, the panic handler in
uefi-services
would useerror!
to print a log message. By usingerror!
, the log message would also include the file name and line number of the panic handler function. As the file name and line number where the panic originated from are logged using thePanicInfo
struct, this information is not necessary. By printing the log message withprintln!
instead oferror!
this unnecessary information can be removed.Example
I temporarily added a panic call to the uefi test runner to show the panic log messages:
Log message before this commit:
Log message after commit:
Checklist
Rewriting History guide for
help.