pradosoft / prado

Prado - Component Framework for PHP
Other
187 stars 70 forks source link

TException Message vs Code, no int Code, no display of numeric error codes in error HTML #948

Closed belisoful closed 1 year ago

belisoful commented 1 year ago

There is general IO to and from a Socket-stream that I have plans to support. Sockets and Socket-streams emit integer error codes, and can emit the PHP translated message.

There is no way to set the actual integer error code of an Exception only its message. Recent changes allowed for exception chaining.

For completeness, I'd like to set, capture and display the numeric integer error Code if there is one. They way this could be done is by appending "=NNN" to the "messageCode"; where NNN is an integer.

This 100% backward compatible and only error codes in the new style of "component_error_message=6" will have the new functionality. In this example the error code is "6". and the "=" will be stripped off also.

belisoful commented 1 year ago

The presumptions about variable parameters are very much baked into PRADO. there is nowhere to fit an actual "errorCode" except as "=NNN" part of the messageErrorCode