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

Identifier cfcatch is global, referencing in a CFC or function should be avoided. #265

Closed
vjperez724 opened this issue Apr 27, 2017 · 4 comments

Comments

@vjperez724
Copy link

I don't believe there's another way to get an error message from a block outside of cfscript syntax, so shouldn't this be an exception? Should CFCs not handle errors?

@ryaneberly
Copy link
Contributor

It sounds like this is a bug in CFLint. I'm surprised we haven't run into this before. Can you get a short code sample.

@vjperez724
Copy link
Author

vjperez724 commented May 1, 2017

Sorry, I'm not sure how to do formatting on here.

<cfcomponent> <cffunction name="myFunction" hint="My function"> <cftry> <!--- do something ---> <cfcatch type="any"> <cfreturn "Error: #CFCATCH.Message#"> </cfcatch> </cftry> <cfreturn "Success"> </cffunction> <cfcomponent>

ryaneberly added a commit that referenced this issue May 4, 2017
@ryaneberly
Copy link
Contributor

@vellian1 Thanks, it is fixed in the dev branch.

@vjperez724
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants