Danp2 / au3WebDriver

Web Driver UDF for AutoIt
MIT License
108 stars 23 forks source link

function headers in error list needs a review #444

Closed mlipok closed 1 year ago

mlipok commented 1 year ago

Feature request

Is your feature request related to a problem?

Some funtion headers in error list needs a review.

Describe the solution you'd like

https://github.com/Danp2/au3WebDriver/commit/26565e02cddc575d212d173111ae0d09a93846b6

https://github.com/Danp2/au3WebDriver/pull/443#issuecomment-1472109904

Describe alternatives you've considered

not related

Additional context

none

mlipok commented 1 year ago

this could be done together with: https://github.com/Danp2/au3WebDriver/issues/437

Danp2 commented 1 year ago

This gets complicated, especially when evaluating for https://github.com/Danp2/au3WebDriver/issues/438#issuecomment-1477734765.

Lets take a look at _WD_CreateSession --

So which of these should be listed in the function header of _WD_CreateSession?

mlipok commented 1 year ago

Intention to create this issue was only reminder to check new features $_WD_ErrorShadowRootNotFound and $_WD_ErrorFrameNotFound in order to suplement in related function headers with information about $_WD_ERROR_NoMatch

Danp2 commented 1 year ago

These $_WD_Error constants are only used in __WD_DetectError, so perhaps they should be move / changed to local constants?

in order to suplement in related function headers with information about $_WD_ERROR_NoMatch

Not sure what you mean here.

mlipok commented 1 year ago

IMHO https://github.com/Danp2/au3WebDriver/pull/448 partialy solves this issue.

but what about: https://github.com/Danp2/au3WebDriver/commit/26565e02cddc575d212d173111ae0d09a93846b6#commitcomment-104723554

Danp2 commented 1 year ago

I think #448 made this issue more complex as I attempted to describe above. FWIW, it wasn't clear when you opened this issue that it was only intended to address the most recently added error codes from __WD_DetectError.

I believe that I already mentioned that I intend to open an new issue on this topic with the hope of achieving a standard method of documenting errors for all existing functions.