Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If (@error > 0) Then _ERROR #44

Merged
merged 1 commit into from
Oct 9, 2023
Merged

If (@error > 0) Then _ERROR #44

merged 1 commit into from
Oct 9, 2023

Conversation

mlipok
Copy link
Owner

@mlipok mlipok commented Oct 9, 2023

@donnyh13 I wonder why did you use:

If (@error > 0) Then _ERROR

instead

If @error Then _ERROR
``

@donnyh13
Copy link
Contributor

donnyh13 commented Oct 9, 2023

I felt it was clearer what I was checking for (for any looking at the code). But I could swap to

if @error then _Error
If you want.

Copy link
Contributor

@donnyh13 donnyh13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thank you.

@mlipok mlipok merged commit bf882e2 into main Oct 9, 2023
@mlipok mlipok deleted the If-(@error-0)-Then-_ERROR branch October 9, 2023 15:19
@mlipok
Copy link
Owner Author

mlipok commented Oct 9, 2023

I felt it was clearer what I was checking for (for any looking at the code).

there was an inconsistency, the example files checked for errors differently than the UDF itself.
This form

If @error Then _ERROR

is generally more often used because it is simpler

@donnyh13
Copy link
Contributor

donnyh13 commented Oct 9, 2023

Okay. Will remember to use that method. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants