Error return code descriptions

Forum for discussion about the documentation project.
Post Reply
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Error return code descriptions

Post by dkl »

Hello,

in some recent wiki edits, some descriptions for error return codes were added. However, it seems that they all refer to Open, which looks like a copy/paste error. For example:
The error code returned by ##**Close**## can be checked using ##[[KeyPgErr|Err]]## in the next line. The function version of ##**Open**## returns directly the error code as a 32 bit ##[[KeyPgLong|Long]]##.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Error return code descriptions

Post by fxm »

Keywords impacted in documentation:
- Bload
- Bsave
- Close
- FileCopy
- GetJoystick
- GetMouse
- ImageCreate
- ImageInfo
- Kill
- Open Com
- Open Cons
- Open Err
- Open Lpt
- Open Pipe
- Open Scrn
- ScreenRes
- ScreenSync
- SetDate
- SetMouse
- SetTime

I can not promise to be able to do the changes quickly because I am on vacation and I have a very bad internet connection.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Error return code descriptions

Post by Tourist Trap »

fxm wrote:Keywords impacted in documentation
...
Hello,

maybe the list of function compatible with ERR() could simply be included in the ERR() page. Then the other side telling at each concerned function pages that they work with ERR() could wait.

The typical source of need for this information is to be able to be confirmed that FileExists is not bound to ERR() even if FileCopy() is. A list in the Err() page would provide the info anyway.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Error return code descriptions

Post by fxm »

dkl wrote:in some recent wiki edits, some descriptions for error return codes were added. However, it seems that they all refer to Open, which looks like a copy/paste error.
It was I who made that mistake.
It is normal that I correct.

Done that.
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Error return code descriptions

Post by fxm »

KeyPgErr → fxm [Added the list of procedures which return directly the error code when they are used in their function versions]
dkl
Site Admin
Posts: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Error return code descriptions

Post by dkl »

Thanks.

Another thing: ImageCreate() doesn't return an error code of course, because it returns the image pointer or NULL. (but it still sets the error code for Err())
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: Error return code descriptions

Post by Tourist Trap »

dkl wrote:ImageCreate() doesn't return an error code of course, because it returns the image pointer or NULL. (but it still sets the error code for Err())
Is this summary true?
Image
fxm
Moderator
Posts: 12081
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Error return code descriptions

Post by fxm »

KeyPgImagecreate → fxm [ImageCreate() doesn't return an error code of course, because it returns the image pointer or NULL.]
KeyPgErr → fxm [ImageCreate() doesn't return an error code of course, because it returns the image pointer or NULL.]
Post Reply