Opened 11 years ago
Closed 11 years ago
#2374 closed Bug (Fixed)
Incorrect return values for up to 4 UDFs
Reported by: | MHz | Owned by: | guinness |
---|---|---|---|
Milestone: | 3.3.9.14 | Component: | Standard UDFs |
Version: | 3.3.9.13 | Severity: | None |
Keywords: | Cc: |
Description
I have done a quick review of usage of SetError and SetExtended in the current Beta include files. I did this to check if the default return value of 1 of SetError and SetExtended is used. Most are good with using all parameters to override the default return value of 1.
I found some issues that may need attention
SetError Use
Note: The following UDF starts with double underscore. It is removed as the tracker software is changing it.
SQLite_ReportError lines 972 and 981 of SQLite.au3
Return not set or used anywhere. It is a internal function so set explicit return value to 0 is my advise.
_StringEncrypt() lines 59 and 61 of String.au3
Sets all 3 values without using the keyword Return which is ill use. It would return 0 on failure instead of the documented blank string.
_WinAPI_SetLastError() line 31 of WinAPIError.au3
Only 2 values for SetError. Perhaps set 3 parameters and use 1 as return value. Actually nothing is checked to qualify the default return value of 1 so 0 seems suitable. Document states return value is none so it seems to be a code bug. MSDN for SetLastError states "This function does not return a value"
SetExtended Use
_VersionCompare() line 449 of Misc.au3
SetExtended is reset by the following inbuilt function call before returning from the UDF when number comparison is used.
Attachments (0)
Change History (4)
comment:1 Changed 11 years ago by guinness
comment:2 Changed 11 years ago by MHz
Beta Version 3.3.9.13
comment:3 Changed 11 years ago by guinness
I have moved the discussion to the help issues thread for clarification, as lines numbers aren't matching up either.
comment:4 Changed 11 years ago by guinness
- Milestone set to 3.3.9.14
- Owner set to guinness
- Resolution set to Fixed
- Status changed from new to closed
Fixed by revision [8312] in version: 3.3.9.14
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Which beta version are you using please?