FR: Add constructor for EInOutError which sets ErrorCode
<!-- See available text formatting: https://gitlab.com/help/user/markdown.md --> ## Summary I would like to have an overloaded constructor for EInOutError, which allows to set the ErrorCode property in the constructor. ## Example Project <!-- If possible, please create an example project that shows the usage of the wanted feature and the advantage of it, and link to it here in the bug report. --> ```pascal uses sysutils; begin try if SomeError then Raise EInOutError.Create('Test',1234); except on E: EInOutError do writeln(E.ToString,' , ErrorCode=',E.ErrorCode); end; end. ``` OK, the example is a bit stupid. EInOutError has a public property ErrorCode: Integer. There is currently however no constructor overload that lets you set ErrorCode, so that one could do: ```pascal raise EInOutError.Create(Message, Code). ``` So, now you have to do something like: ```pascal E:=EInOutError.Create(SCannotCreateEmptyDir); E.ErrorCode:=3; Raise E; ``` Setting ErrorCode is nice for applications that want to show their own errormessages in reaction to an EInOutError exception, so you don't have to rely on the Message part to know what went wrong. If at all possible I'ld like to have such an overload for the CreateFmt() versions as well.
issue