Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

can I ignore a return result?

Participant ,
Dec 20, 2010 Dec 20, 2010

Hi!

I'm not too sure what am I supposed to do with situation like this.

My CF application work just fine but suddenly the DB guy changed a stored Procedure that is used in my application.

The changes did not cause major effects but I noticed the cfmail tags and a delete statement right after this stored procedure, is not executed anymore.

The only different between old str. proc and new str. proc. is that the new str. proc. is now returning some result where my app. does not need.

So in other words, after that str. proc is executed, it returns a result and my CF ignore it and I expect CF should continue on running the rest of the codes which is a CFMAIL tags and a delete statement.

The DB guy can't do much since using the old str. proc. produced unexpected result and also according to him he doesn't have much choice since the db is set by a third party vendor where he doesn't have too much access to.

My question is:

I have tried to adjust my codes so that my CFMAIL and delete statement run regardless of how the new str. proc being set but I'm not so sure how to handle  the return result by this str. proc.

Can I just ignore it?

The adjusment I made was to put all my CF codes above this str. proc. So after all my CF codes are run, I let the str proc. run and that's the end of the process. Is this acceptable?  what can go wrong if I let this app running and ignoring the return result on every process? Please advice

TOPICS
Getting started
588
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 20, 2010 Dec 20, 2010

Well technically no, nothing in ColdFusion will stop working or error simply because you're ignoring a return value from a function, method or stored procedure.

Whether this matters on a business level, only you can tell that by examining the code carefully. The fact that your code is now behaving in a different way (ie not running parts it's meant to) would imply that application-wise it actually matters a lot what the returncode is.

If something's changes and it has an effect, it probably matters.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 20, 2010 Dec 20, 2010

If something's changes and it has an effect, it probably matters.

This is probably a good time to mention something like "unit tests"...

http://mxunit.org/

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2010 Dec 24, 2010
LATEST
Re: can I ignore a return result?

Yes. Don't move anything. I would advise you to leave everything the way it was.

If you tamper with the result or begin to move things around it, then you might probably create a dependency with it. A result you ignore is unlikely to hurt you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources