A_LastError's docs do not mention that OSError() can get the error description Topic is solved

Share your ideas as to how the documentation can be improved.
Saiapatsu
Posts: 17
Joined: 11 Jul 2019, 15:02

A_LastError's docs do not mention that OSError() can get the error description

Post by Saiapatsu » 25 Feb 2023, 06:00

I had formulated a function to get the description of a Windows error code because the documentation for https://www.autohotkey.com/docs/v2/Variables.htm#LastError did not actually link any specific place to read about the error codes.
I was told that AutoHotkey v2 already has this built-in: one can simply do OSError().Message to get the last error's description, albeit with the error code prepended to the output.
This should be mentioned in A_LastError's documentation.
For that matter, OSError's documentation should clarify that its error code and description are based on GetLastError or both OSError and A_LastError should link to a common article about GetLastError and OS error codes.

User avatar
Ragnar
Posts: 623
Joined: 30 Sep 2013, 15:25

Re: A_LastError's docs do not mention that OSError() can get the error description  Topic is solved

Post by Ragnar » 26 Sep 2023, 07:49

Thanks for the suggestion. I've added this.

Post Reply

Return to “Suggestions on Documentation Improvements”