CFTRY / CFCATCH not working

2014-09-09 Thread Robert Harrison

I have a script that returns image properties to me (below).   After years of 
using it I've hit some sort of file that crashes it.  The error I'm getting is: 

Numbers of source Raster bands and source color space components do not 
match null 

I'm assuming that from a corrupt image file, but the real problem is I wrapped 
this in a cftry / cfcatch (as shown below) and it's ignoring the CFTRY and 
giving me a hard error. 


cftry
cfscript
function get_imageinfo(imgfile){
  jFileIn = 
createObject(java,java.io.File).init(imgfile);
  ImageInfo = StructNew();
  ImageObject = 
createObject(java,javax.imageio.ImageIO).read(jFileIn);  
-THIS IS THE OFFENDING LINE
  imageFile = CreateObject(java, 
java.io.File); 
  imageFile.init(imgfile); 
  sizeb = imageFile.length(); 
  sizekb = numberformat(sizeb / 1024, 
9.99);
  sizemb = numberformat(sizekb / 1024, 
.99);
  get_imginfo = StructNew();
  get_imginfo.ImgWidth = ImageObject.getWidth();
  get_imginfo.ImgHeight = 
ImageObject.getHeight();
  get_imginfo.SizeKB = sizekb;
  get_imginfo.SizeMB = sizemb;
  get_imginfo.ImageFormat = 
ListLast(ListLast(imgfile, \), .);
}
/cfscript
cfcatch type=Anycfset 
get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch
/cftry


It runs this in a loop over a bunch of images and works until it hits the bad 
file... but it's ignoring my CFTRY and still throwing a hard error.  

Anyone have any ideas on why the CRFTY/CFCATCH is not working.  Is there a 
problem because I'm catching a cfscript block?

Thanks

Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_williams 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359254
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFTRY / CFCATCH not working

2014-09-09 Thread Cameron Childress

If there is an error in your error handling code you will get a hard error. It
may be because you are still attempting to work with the corrupt file in
your catch.

Change this:
cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset
get_imginfo.ImgHeight=0/cfcatch

To this:
cfcatch type=Any/cfcatch

...and see if it makes the error go away.

-Cameron

On Tue, Sep 9, 2014 at 1:02 PM, Robert Harrison rob...@austin-williams.com
wrote:


 I have a script that returns image properties to me (below).   After years
 of using it I've hit some sort of file that crashes it.  The error I'm
 getting is:

 Numbers of source Raster bands and source color space components
 do not match null

 I'm assuming that from a corrupt image file, but the real problem is I
 wrapped this in a cftry / cfcatch (as shown below) and it's ignoring the
 CFTRY and giving me a hard error.


 cftry
 cfscript
 function get_imageinfo(imgfile){
   jFileIn =
 createObject(java,java.io.File).init(imgfile);
   ImageInfo = StructNew();
   ImageObject =
 createObject(java,javax.imageio.ImageIO).read(jFileIn);
 -THIS IS THE OFFENDING LINE
   imageFile = CreateObject(java,
 java.io.File);
   imageFile.init(imgfile);
   sizeb = imageFile.length();
   sizekb = numberformat(sizeb / 1024,
 9.99);
   sizemb = numberformat(sizekb / 1024,
 .99);
   get_imginfo = StructNew();
   get_imginfo.ImgWidth =
 ImageObject.getWidth();
   get_imginfo.ImgHeight =
 ImageObject.getHeight();
   get_imginfo.SizeKB = sizekb;
   get_imginfo.SizeMB = sizemb;
   get_imginfo.ImageFormat =
 ListLast(ListLast(imgfile, \), .);
 }
 /cfscript
 cfcatch type=Anycfset
 get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch
 /cftry


 It runs this in a loop over a bunch of images and works until it hits the
 bad file... but it's ignoring my CFTRY and still throwing a hard error.

 Anyone have any ideas on why the CRFTY/CFCATCH is not working.  Is there a
 problem because I'm catching a cfscript block?

 Thanks

 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
 T 631.231.6600 X 119   F 631.434.7022
 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austin_williams


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359255
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFTRY / CFCATCH not working

2014-09-09 Thread Robert Harrison

Thanks, but that had no effect at all. 

Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_williams 


-Original Message-
From: Cameron Childress [mailto:camer...@gmail.com] 
Sent: Tuesday, September 09, 2014 1:25 PM
To: cf-talk
Subject: Re: CFTRY / CFCATCH not working


If there is an error in your error handling code you will get a hard error. It 
may be because you are still attempting to work with the corrupt file in your 
catch.

Change this:
cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset 
get_imginfo.ImgHeight=0/cfcatch

To this:
cfcatch type=Any/cfcatch

...and see if it makes the error go away.

-Cameron

On Tue, Sep 9, 2014 at 1:02 PM, Robert Harrison rob...@austin-williams.com
wrote:


 I have a script that returns image properties to me (below).   After years
 of using it I've hit some sort of file that crashes it.  The error I'm 
 getting is:

 Numbers of source Raster bands and source color space 
 components do not match null

 I'm assuming that from a corrupt image file, but the real problem is I 
 wrapped this in a cftry / cfcatch (as shown below) and it's ignoring 
 the CFTRY and giving me a hard error.


 cftry
 cfscript
 function get_imageinfo(imgfile){
   jFileIn = 
 createObject(java,java.io.File).init(imgfile);
   ImageInfo = StructNew();
   ImageObject = 
 createObject(java,javax.imageio.ImageIO).read(jFileIn);
 -THIS IS THE OFFENDING LINE
   imageFile = CreateObject(java, 
 java.io.File);
   imageFile.init(imgfile);
   sizeb = imageFile.length();
   sizekb = numberformat(sizeb / 1024, 
 9.99);
   sizemb = numberformat(sizekb / 1024, 
 .99);
   get_imginfo = StructNew();
   get_imginfo.ImgWidth = 
 ImageObject.getWidth();
   get_imginfo.ImgHeight = 
 ImageObject.getHeight();
   get_imginfo.SizeKB = sizekb;
   get_imginfo.SizeMB = sizemb;
   get_imginfo.ImageFormat = 
 ListLast(ListLast(imgfile, \), .);
 }
 /cfscript
 cfcatch type=Anycfset 
 get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch
 /cftry


 It runs this in a loop over a bunch of images and works until it hits 
 the bad file... but it's ignoring my CFTRY and still throwing a hard error.

 Anyone have any ideas on why the CRFTY/CFCATCH is not working.  Is 
 there a problem because I'm catching a cfscript block?

 Thanks

 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
 T 631.231.6600 X 119   F 631.434.7022
 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austin_williams


 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359256
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFTRY / CFCATCH not working

2014-09-09 Thread Money Pit

Any particular reason you are not using cfscript versions of try/catch?
Old version of CF?

try {
code goes here
}
catch(Any excpt) {
   code goes here
}
Given any thought to a different image processor to see if you get a
different result?  I'm thinking cfimage, assuming you are using at least
CF8.

-- 
--m@Robertson--
Janitor, The Robertson Team
mysecretbase.com


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359257
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFTRY / CFCATCH not working

2014-09-09 Thread Byron Mann

Numbers of source Raster bands and source color space components do not
match null

Where do you see this error? In the exception logs?  Or is the thread just
dying and outputting this and not continuing on?

Also what CF Version, I know older versions seemed to have many more
problems reading image files than more recent version.

On Tue, Sep 9, 2014 at 1:33 PM, Robert Harrison rob...@austin-williams.com
wrote:


 Thanks, but that had no effect at all.

 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
 T 631.231.6600 X 119   F 631.434.7022
 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austin_williams


 -Original Message-
 From: Cameron Childress [mailto:camer...@gmail.com]
 Sent: Tuesday, September 09, 2014 1:25 PM
 To: cf-talk
 Subject: Re: CFTRY / CFCATCH not working


 If there is an error in your error handling code you will get a hard
 error. It may be because you are still attempting to work with the corrupt
 file in your catch.

 Change this:
 cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset
 get_imginfo.ImgHeight=0/cfcatch

 To this:
 cfcatch type=Any/cfcatch

 ...and see if it makes the error go away.

 -Cameron

 On Tue, Sep 9, 2014 at 1:02 PM, Robert Harrison 
 rob...@austin-williams.com
 wrote:

 
  I have a script that returns image properties to me (below).   After
 years
  of using it I've hit some sort of file that crashes it.  The error I'm
  getting is:
 
  Numbers of source Raster bands and source color space
  components do not match null
 
  I'm assuming that from a corrupt image file, but the real problem is I
  wrapped this in a cftry / cfcatch (as shown below) and it's ignoring
  the CFTRY and giving me a hard error.
 
 
  cftry
  cfscript
  function get_imageinfo(imgfile){
jFileIn =
  createObject(java,java.io.File).init(imgfile);
ImageInfo = StructNew();
ImageObject =
  createObject(java,javax.imageio.ImageIO).read(jFileIn);
  -THIS IS THE OFFENDING LINE
imageFile = CreateObject(java,
  java.io.File);
imageFile.init(imgfile);
sizeb = imageFile.length();
sizekb = numberformat(sizeb / 1024,
  9.99);
sizemb = numberformat(sizekb / 1024,
  .99);
get_imginfo = StructNew();
get_imginfo.ImgWidth =
  ImageObject.getWidth();
get_imginfo.ImgHeight =
  ImageObject.getHeight();
get_imginfo.SizeKB = sizekb;
get_imginfo.SizeMB = sizemb;
get_imginfo.ImageFormat =
  ListLast(ListLast(imgfile, \), .);
  }
  /cfscript
  cfcatch type=Anycfset
  get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch
  /cftry
 
 
  It runs this in a loop over a bunch of images and works until it hits
  the bad file... but it's ignoring my CFTRY and still throwing a hard
 error.
 
  Anyone have any ideas on why the CRFTY/CFCATCH is not working.  Is
  there a problem because I'm catching a cfscript block?
 
  Thanks
 
  Robert Harrison
  Director of Interactive Services
 
  Austin  Williams
  Advertising I Branding I Digital I Direct
  125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
  T 631.231.6600 X 119   F 631.434.7022
  http://www.austin-williams.com
 
  Blog:  http://www.austin-williams.com/blog
  Twitter:  http://www.twitter.com/austin_williams
 
 
 



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359258
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFTRY / CFCATCH not working

2014-09-09 Thread Robert Harrison

It's a seven year old site but it's on a CF10 server.  Tried using CFIMAGE but 
it's too slow. 

Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austi

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359259
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFTRY / CFCATCH not working

2014-09-09 Thread Money Pit

Looks like the code you are using is bhImgInfo() from cflib, with only very
slight changes.  There's more than one way to skin that cat:

https://gist.github.com/vikaskanani/6256084

looks more robust in the catch department.  Maybe a little too robust, but
it also separates out the file read from the createObject statement.

-- 
--m@Robertson--
Janitor, The Robertson Team
mysecretbase.com


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359261
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFTRY / CFCATCH not working

2014-09-09 Thread Russ Michaels

not an answer to your question, but have you tried using ImageMagick or
cfx_openimage instead ?
I have found both to be more reliable than CF's built in image handling.

On Tue, Sep 9, 2014 at 6:56 PM, Robert Harrison rob...@austin-williams.com
wrote:


 It's a seven year old site but it's on a CF10 server.  Tried using CFIMAGE
 but it's too slow.

 Robert Harrison
 Director of Interactive Services

 Austin  Williams
 Advertising I Branding I Digital I Direct
 125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
 T 631.231.6600 X 119   F 631.434.7022
 http://www.austin-williams.com

 Blog:  http://www.austin-williams.com/blog
 Twitter:  http://www.twitter.com/austi

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359262
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfcatch DB connection failure - for failover

2011-07-06 Thread eric.da...@vmmc.org eric.da...@vmmc.org

I was able to get the following code to run sucessfully.  I took the database 
offline so CF couldn't connect to it.  As a second test, I also changed the 
server name to an invalid on in the datasource setup, and both scenarios worked.

cftry
cfquery name=testme datasource=datasource maxrows=10 timeout=2
Select * from testdb
/cfquery
cfcatch
cfquery name=testme datasource=datasource2 maxrows=10 timeout=5
Select * from testdb
/cfquery
/cfcatch
/cftry

 Hi a bit stuck at the moment,
 
 I am trying to implement a DB fail over to a slave database through CF 
 9.  I am using MYSQL as a DB.  I have setup datasource in the 
 application.cfc to point to the main db.  When i trigger a stop 
 service on the main db - which causes a failed db connection, i'm 
 trying to get CF to change the datasource to the failover database. 
 All that happens is the site keeps trying to connect to the main db 
 without updating the db datasource in the cfcatch.  Note: this code 
 below works if i have a syntax error in the query, but not for a DB 
 connection failure.
 
 See my code below, which i am putting in the onRequestStart and i have 
 unchecked Maintain Connections in the datasource settings.
 
 cftry
  
 !--- Test whether the DB this application uses is accessible 

 by getting some data. ---
  
 cfquery name=testDB dataSource=#application.primary_datasource# 
 maxrows=2
 
 SELECT id FROM user
  
 /cfquery
   
  
 cfcatch type=database 
   
 cfset application.primary_datasource = failoverdb
  
 /cfcatch

 /cftry
 
 I welcome any thoughts and assistance
 
 thanks in advance.
 
 Bas.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346112
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cfcatch DB connection failure - for failover

2011-07-05 Thread Sebastian Powell

Hi a bit stuck at the moment,

I am trying to implement a DB fail over to a slave database through CF 9.  I am 
using MYSQL as a DB.  I have setup datasource in the application.cfc to point 
to the main db.  When i trigger a stop service on the main db - which causes a 
failed db connection, i'm trying to get CF to change the datasource to the 
failover database. All that happens is the site keeps trying to connect to the 
main db without updating the db datasource in the cfcatch.  Note: this code 
below works if i have a syntax error in the query, but not for a DB connection 
failure.

See my code below, which i am putting in the onRequestStart and i have 
unchecked Maintain Connections in the datasource settings.

cftry
  !--- Test whether the DB this application uses is accessible 
by getting some data. ---
  cfquery name=testDB dataSource=#application.primary_datasource# 
maxrows=2
 SELECT id FROM user
  /cfquery

  cfcatch type=database 
   cfset application.primary_datasource = failoverdb
  /cfcatch
/cftry

I welcome any thoughts and assistance

thanks in advance.

Bas.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346072
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFFILE / CFCATCH

2011-07-04 Thread Mack

On Fri, Jul 1, 2011 at 4:16 AM, morgan l greyk...@gmail.com wrote:

 Looks like you're the victim of scenario #2 in this KB article:
 http://kb2.adobe.com/cps/181/tn_18171.html

That article applies to CF5 and I doubt Jenny is running CF5.

-- 
Mack

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346065
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFFILE / CFCATCH

2011-07-01 Thread Jenny Gavin-Wear

Many thanks for your reply, interesting article.

I think this article would only apply if I was losing all session variables?



-Original Message-
From: morgan l [mailto:greyk...@gmail.com]
Sent: 01 July 2011 02:16
To: cf-talk
Subject: Re: CFFILE / CFCATCH



Looks like you're the victim of scenario #2 in this KB article:
http://kb2.adobe.com/cps/181/tn_18171.html

On Thu, Jun 30, 2011 at 6:57 PM, Jenny Gavin-Wear 
jenn...@fasttrackonline.co.uk wrote:




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346023
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFFILE / CFCATCH

2011-06-30 Thread Andrew Scott

Jenny, I am going to assume that you have tried to cfdump and abort in the
cfcatch to see what the message contains. Failing that I do know that some
of these messages have hidden characters and will not match even if you try.

I don't have the link handy at the moment, but I did write a blog about this
sort of thing some months ago.


Regards,
Andrew Scott
http://www.andyscott.id.au/



 -Original Message-
 From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk]
 Sent: Thursday, 30 June 2011 2:20 PM
 To: cf-talk
 Subject: CFFILE / CFCATCH
 
 
 I'm trying to cfcatch cffile mime type errors.
 
 I can't see where I'm going wrong.
 
 cftry
 cfoutput
 cffile action=upload attributes=normal
 destination=#session.currentDirectory#
 filefield=form.fileField nameconflict=overwrite accept=image/jpeg,
 image/jpg, image/pjpeg, image/gif, image/png /cfoutput cfcatch
 type=any cfif isdefined(cfcatch.Message) and findnocase(not
 accepted, cfcatch.Message) cfset session.sysmessage = Please upload
 images of type: .jpg, .gif or .png cflocation url=folder-view.cfm
/cfif
 /cfcatch /cftry
 
 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345950
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFFILE / CFCATCH

2011-06-30 Thread John M Bliss

Unless something has changed in recent versions of CF, in addition to
cffile's accept arg, after your /cftry you should always check extension
of file saved to disk and, if illegal, immediately delete file. Reason:
those mimetypes come from end-user's browser and can be
wrong/spoofed/unpredictable (i.e. you won't find a set-in-stone one-to-one
relationship between mimtypes and extensions...it changes based on OS,
browser, etc).

cfif not listfindnocase(listOfOkExtensions, listlast(cffile.serverfile,
.))
cffile action=delete
file=#session.currentDirectory##cffile.serverfile#
cfset session.sysmessage = Please upload images of type: .jpg, .gif or
.png
cflocation url=folder-view.cfm
/cfif

Having said that, I concur with Andrew: try to cfdump and abort in
the cfcatch to see what the message contains.

On Thu, Jun 30, 2011 at 1:56 AM, Andrew Scott andr...@andyscott.id.auwrote:


 Jenny, I am going to assume that you have tried to cfdump and abort in the
 cfcatch to see what the message contains. Failing that I do know that some
 of these messages have hidden characters and will not match even if you
 try.

 I don't have the link handy at the moment, but I did write a blog about
 this
 sort of thing some months ago.


 Regards,
 Andrew Scott
 http://www.andyscott.id.au/



  -Original Message-
  From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk]
  Sent: Thursday, 30 June 2011 2:20 PM
  To: cf-talk
  Subject: CFFILE / CFCATCH
 
 
  I'm trying to cfcatch cffile mime type errors.
 
  I can't see where I'm going wrong.
 
  cftry
  cfoutput
  cffile action=upload attributes=normal
  destination=#session.currentDirectory#
  filefield=form.fileField nameconflict=overwrite accept=image/jpeg,
  image/jpg, image/pjpeg, image/gif, image/png /cfoutput cfcatch
  type=any cfif isdefined(cfcatch.Message) and findnocase(not
  accepted, cfcatch.Message) cfset session.sysmessage = Please upload
  images of type: .jpg, .gif or .png cflocation url=folder-view.cfm
 /cfif
  /cfcatch /cftry
 
 


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345952
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFFILE / CFCATCH

2011-06-30 Thread Jenny Gavin-Wear

Hi John,

Thanks for the reply.

Yes, I dumped the results of the cfcatch.

Strangely, the cflocation is working, but the session.sysmessage is not
working.  So although the use correctly gets returned to the calling page
I'm unable to let them know why.

If you have a link to your blog I'd be very interested to read it, please.

Thanks,

Jenny

-Original Message-
From: Andrew Scott [mailto:andr...@andyscott.id.au]
Sent: 30 June 2011 07:57
To: cf-talk
Subject: RE: CFFILE / CFCATCH



Jenny, I am going to assume that you have tried to cfdump and abort in the
cfcatch to see what the message contains. Failing that I do know that some
of these messages have hidden characters and will not match even
if you try.

I don't have the link handy at the moment, but I did write a blog
about this
sort of thing some months ago.


Regards,
Andrew Scott
http://www.andyscott.id.au/



 -Original Message-
 From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk]
 Sent: Thursday, 30 June 2011 2:20 PM
 To: cf-talk
 Subject: CFFILE / CFCATCH


 I'm trying to cfcatch cffile mime type errors.

 I can't see where I'm going wrong.

 cftry
 cfoutput
 cffile action=upload attributes=normal
 destination=#session.currentDirectory#
 filefield=form.fileField nameconflict=overwrite accept=image/jpeg,
 image/jpg, image/pjpeg, image/gif, image/png /cfoutput cfcatch
 type=any cfif isdefined(cfcatch.Message) and findnocase(not
 accepted, cfcatch.Message) cfset session.sysmessage = Please upload
 images of type: .jpg, .gif or .png cflocation url=folder-view.cfm
/cfif
 /cfcatch /cftry






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345954
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFFILE / CFCATCH

2011-06-30 Thread Andrew Scott

Jenny it was me not John, anyway here is the link.

http://www.andyscott.id.au/2010/9/19/ColdFusion-and-the-expression-does-not-
contain-is-broken


Regards,
Andrew Scott
http://www.andyscott.id.au/


 -Original Message-
 From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk]
 Sent: Friday, 1 July 2011 12:11 AM
 To: cf-talk
 Subject: RE: CFFILE / CFCATCH
 
 
 Hi John,
 
 Thanks for the reply.
 
 Yes, I dumped the results of the cfcatch.
 
 Strangely, the cflocation is working, but the session.sysmessage is not
 working.  So although the use correctly gets returned to the calling page
I'm
 unable to let them know why.
 
 If you have a link to your blog I'd be very interested to read it, please.
 
 Thanks,
 
 Jenny


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345955
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFFILE / CFCATCH

2011-06-30 Thread John M Bliss

Perhaps do this...?

cflocation url=folder-view.cfm addtoken=true

On Thu, Jun 30, 2011 at 9:10 AM, Jenny Gavin-Wear 
jenn...@fasttrackonline.co.uk wrote:


 Hi John,

 Thanks for the reply.

 Yes, I dumped the results of the cfcatch.

 Strangely, the cflocation is working, but the session.sysmessage is not
 working.  So although the use correctly gets returned to the calling page
 I'm unable to let them know why.

 If you have a link to your blog I'd be very interested to read it, please.

 Thanks,

 Jenny

 -Original Message-
 From: Andrew Scott [mailto:andr...@andyscott.id.au]
 Sent: 30 June 2011 07:57
 To: cf-talk
 Subject: RE: CFFILE / CFCATCH
 
 
 
 Jenny, I am going to assume that you have tried to cfdump and abort in
 the
 cfcatch to see what the message contains. Failing that I do know that
 some
 of these messages have hidden characters and will not match even
 if you try.
 
 I don't have the link handy at the moment, but I did write a blog
 about this
 sort of thing some months ago.
 
 
 Regards,
 Andrew Scott
 http://www.andyscott.id.au/
 
 
 
  -Original Message-
  From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk]
  Sent: Thursday, 30 June 2011 2:20 PM
  To: cf-talk
  Subject: CFFILE / CFCATCH
 
 
  I'm trying to cfcatch cffile mime type errors.
 
  I can't see where I'm going wrong.
 
  cftry
  cfoutput
  cffile action=upload attributes=normal
  destination=#session.currentDirectory#
  filefield=form.fileField nameconflict=overwrite accept=image/jpeg,
  image/jpg, image/pjpeg, image/gif, image/png /cfoutput cfcatch
  type=any cfif isdefined(cfcatch.Message) and findnocase(not
  accepted, cfcatch.Message) cfset session.sysmessage = Please upload
  images of type: .jpg, .gif or .png cflocation url=folder-view.cfm
 /cfif
  /cfcatch /cftry
 
 
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345956
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFFILE / CFCATCH

2011-06-30 Thread Michael Grant

+1. 
cfdump var=#cfcatch#/
cfabort /

Also, you can drop the extraneous cfoutput around the cffile. Variables are 
automatically outputted if used as an attribute value in a cftag and wrapped in 
#.

Sent from my iPhone.


On 2011-06-30, at 2:56 AM, Andrew Scott andr...@andyscott.id.au wrote:

 
 Jenny, I am going to assume that you have tried to cfdump and abort in the
 cfcatch to see what the message contains. Failing that I do know that some
 of these messages have hidden characters and will not match even if you try.
 
 I don't have the link handy at the moment, but I did write a blog about this
 sort of thing some months ago.
 
 
 Regards,
 Andrew Scott
 http://www.andyscott.id.au/
 
 
 
 -Original Message-
 From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk]
 Sent: Thursday, 30 June 2011 2:20 PM
 To: cf-talk
 Subject: CFFILE / CFCATCH
 
 
 I'm trying to cfcatch cffile mime type errors.
 
 I can't see where I'm going wrong.
 
 cftry
 cfoutput
 cffile action=upload attributes=normal
 destination=#session.currentDirectory#
 filefield=form.fileField nameconflict=overwrite accept=image/jpeg,
 image/jpg, image/pjpeg, image/gif, image/png /cfoutput cfcatch
 type=any cfif isdefined(cfcatch.Message) and findnocase(not
 accepted, cfcatch.Message) cfset session.sysmessage = Please upload
 images of type: .jpg, .gif or .png cflocation url=folder-view.cfm
 /cfif
 /cfcatch /cftry
 
 
 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346016
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFFILE / CFCATCH

2011-06-30 Thread Jenny Gavin-Wear

Thanks Michael,

I looked for the dump first.

The only problem is the session variable not being set inside the cfcatch.

I'm sure I am catching the error for the cflocation to trigger.

Jenny


-Original Message-
From: Michael Grant [mailto:mgr...@modus.bz]
Sent: 01 July 2011 00:04
To: cf-talk
Subject: Re: CFFILE / CFCATCH



+1.
cfdump var=#cfcatch#/
cfabort /

Also, you can drop the extraneous cfoutput around the cffile.
Variables are automatically outputted if used as an attribute
value in a cftag and wrapped in #.

Sent from my iPhone.


On 2011-06-30, at 2:56 AM, Andrew Scott andr...@andyscott.id.au wrote:


 Jenny, I am going to assume that you have tried to cfdump and
abort in the
 cfcatch to see what the message contains. Failing that I do
know that some
 of these messages have hidden characters and will not match
even if you try.

 I don't have the link handy at the moment, but I did write a
blog about this
 sort of thing some months ago.


 Regards,
 Andrew Scott
 http://www.andyscott.id.au/



 -Original Message-
 From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk]
 Sent: Thursday, 30 June 2011 2:20 PM
 To: cf-talk
 Subject: CFFILE / CFCATCH


 I'm trying to cfcatch cffile mime type errors.

 I can't see where I'm going wrong.

 cftry
 cfoutput
 cffile action=upload attributes=normal
 destination=#session.currentDirectory#
 filefield=form.fileField nameconflict=overwrite accept=image/jpeg,
 image/jpg, image/pjpeg, image/gif, image/png /cfoutput cfcatch
 type=any cfif isdefined(cfcatch.Message) and findnocase(not
 accepted, cfcatch.Message) cfset session.sysmessage = Please upload
 images of type: .jpg, .gif or .png cflocation url=folder-view.cfm
 /cfif
 /cfcatch /cftry








~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346017
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CFFILE / CFCATCH

2011-06-30 Thread morgan l

Looks like you're the victim of scenario #2 in this KB article:
http://kb2.adobe.com/cps/181/tn_18171.html

On Thu, Jun 30, 2011 at 6:57 PM, Jenny Gavin-Wear 
jenn...@fasttrackonline.co.uk wrote:


 Thanks Michael,

 I looked for the dump first.

 The only problem is the session variable not being set inside the cfcatch.

 I'm sure I am catching the error for the cflocation to trigger.

 Jenny


 -Original Message-
 From: Michael Grant [mailto:mgr...@modus.bz]
 Sent: 01 July 2011 00:04
 To: cf-talk
 Subject: Re: CFFILE / CFCATCH
 
 
 
 +1.
 cfdump var=#cfcatch#/
 cfabort /
 
 Also, you can drop the extraneous cfoutput around the cffile.
 Variables are automatically outputted if used as an attribute
 value in a cftag and wrapped in #.
 
 Sent from my iPhone.
 
 
 On 2011-06-30, at 2:56 AM, Andrew Scott andr...@andyscott.id.au
 wrote:
 
 
  Jenny, I am going to assume that you have tried to cfdump and
 abort in the
  cfcatch to see what the message contains. Failing that I do
 know that some
  of these messages have hidden characters and will not match
 even if you try.
 
  I don't have the link handy at the moment, but I did write a
 blog about this
  sort of thing some months ago.
 
 
  Regards,
  Andrew Scott
  http://www.andyscott.id.au/
 
 
 
  -Original Message-
  From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk]
  Sent: Thursday, 30 June 2011 2:20 PM
  To: cf-talk
  Subject: CFFILE / CFCATCH
 
 
  I'm trying to cfcatch cffile mime type errors.
 
  I can't see where I'm going wrong.
 
  cftry
  cfoutput
  cffile action=upload attributes=normal
  destination=#session.currentDirectory#
  filefield=form.fileField nameconflict=overwrite
 accept=image/jpeg,
  image/jpg, image/pjpeg, image/gif, image/png /cfoutput cfcatch
  type=any cfif isdefined(cfcatch.Message) and findnocase(not
  accepted, cfcatch.Message) cfset session.sysmessage = Please
 upload
  images of type: .jpg, .gif or .png cflocation
 url=folder-view.cfm
  /cfif
  /cfcatch /cftry
 
 
 
 
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346018
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


CFFILE / CFCATCH

2011-06-29 Thread Jenny Gavin-Wear

I'm trying to cfcatch cffile mime type errors.

I can't see where I'm going wrong.

cftry
cfoutput
cffile action=upload attributes=normal
destination=#session.currentDirectory#
filefield=form.fileField nameconflict=overwrite accept=image/jpeg,
image/jpg, image/pjpeg, image/gif, image/png
/cfoutput
cfcatch type=any
cfif isdefined(cfcatch.Message) and findnocase(not accepted,
cfcatch.Message)
cfset session.sysmessage = Please upload images of type: .jpg, .gif or
.png
cflocation url=folder-view.cfm
/cfif
/cfcatch
/cftry



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345949
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


sql method in cfcatch

2010-04-28 Thread fun and learning

Hi All -

I am using try/catch around a cfquery. When I am trying to output #cfcatch.sql# 
or #cfcatch.where#, I get an error that SQl or where is undefined in cfcatch. 
These two used to work for me before. I have no issues with cfcatch.message or 
cfcatch.detail.

Can anyone let me know what could be the issue?



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333193
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


cfcatch issue

2010-04-28 Thread fun and learning

hi all- 

I am using try/catch around a cfquery, and when I use #cfcatch.SQl# within 
cfcatch, I get an error saying sql is undefined
in cfcatch. The same happens with #cfcatch.where#. Everything is fine with 
#cfcatch.detail#, #cfcatch.message#.

I have been working with #cfcatch.sql# and #cfcatch.where# with no issues until 
today. Can any one let me know what could be
the issue 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333194
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: cfcatch issue

2010-04-28 Thread Paul Alkema

Are you on CF8 or higher? Try dumping the cfcatch scope and see what you
get.

Paul Alkema
PaulAlkema.com

-Original Message-
From: fun and learning [mailto:funandlrnn...@gmail.com] 
Sent: Wednesday, April 28, 2010 4:26 PM
To: cf-talk
Subject: cfcatch issue


hi all- 

I am using try/catch around a cfquery, and when I use #cfcatch.SQl# within
cfcatch, I get an error saying sql is undefined
in cfcatch. The same happens with #cfcatch.where#. Everything is fine with
#cfcatch.detail#, #cfcatch.message#.

I have been working with #cfcatch.sql# and #cfcatch.where# with no issues
until today. Can any one let me know what could be
the issue 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333196
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: sql method in cfcatch

2010-04-28 Thread Barney Boisvert

The error you're catching might not have those properties.  For
example, maybe it's a connection failure error.  Or perhaps an
expression error in a CFQUERYPARAM.  Those keys will be present when
appropriate, but they're not necessarily available all the time.  As
such, you have to do existence checks before you use them.

cheers,
barneyb

On Wed, Apr 28, 2010 at 1:11 PM, fun and learning
funandlrnn...@gmail.com wrote:

 Hi All -

 I am using try/catch around a cfquery. When I am trying to output 
 #cfcatch.sql# or #cfcatch.where#, I get an error that SQl or where is 
 undefined in cfcatch. These two used to work for me before. I have no issues 
 with cfcatch.message or cfcatch.detail.

 Can anyone let me know what could be the issue?



 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333197
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: cfcatch issue

2010-04-28 Thread Dave Watts

 I am using try/catch around a cfquery, and when I use #cfcatch.SQl# within 
 cfcatch, I get an error saying sql is undefined
 in cfcatch. The same happens with #cfcatch.where#. Everything is fine with 
 #cfcatch.detail#, #cfcatch.message#.

 I have been working with #cfcatch.sql# and #cfcatch.where# with no issues 
 until today. Can any one let me know what could be
 the issue

Those variables will only be available if the thrown exception is of
TYPE=DATABASE. So check your CFCATCH.TYPE to see if that's what you
have.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333200
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Cannot declare local variable cfcatch twice

2009-08-19 Thread SANJEEV SINGLA

Hi All,


I migrated my CFMX6.1 application to CF8 on my local dev machine and getting 
the following error.


Cannot declare local variable cfcatch twice. Local variables cannot have the 
same names as parameters or other local variables. 

Please let me know how it can be resolved.

Thanks!
Sanjeev 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325536
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Cannot declare local variable cfcatch twice

2009-08-19 Thread Adrian Lynch

Can we see your code?

 -Original Message-
 From: SANJEEV SINGLA [mailto:planetsanj...@gmail.com]
 Sent: 19 August 2009 07:43
 To: cf-talk
 Subject: Cannot declare local variable cfcatch twice
 
 
 Hi All,
 
 
 I migrated my CFMX6.1 application to CF8 on my local dev machine and
 getting the following error.
 
 
 Cannot declare local variable cfcatch twice. Local variables cannot
 have the same names as parameters or other local variables.
 
 Please let me know how it can be resolved.
 
 Thanks!
 Sanjeev


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325537
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Cannot declare local variable cfcatch twice

2009-08-19 Thread Matt Quackenbush

The code would certainly help pinpoint exactly where the issue lies, but as
the error message indicates, it is caused by the fact that somewhere in your
code a variable is declared twice within a function.  This can be caused by
several factors.  Here are a couple of examples that will do it.

Ex. 1
cffunction name=foo
cfargument name=bar /

cfset var bar =  /
/cffunction


Ex. 2
cffunction name=foo
  cfscript
var err = ;

try {
   // code here
} catch (any err) {
}
  /cfscript
/cffunction


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325543
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Cannot declare local variable cfcatch twice

2009-08-19 Thread Kevin Pepperman

This question was cross posted at the same time and answered on cfaussies'
group almost immediately.
But was not followed through with.

On Wed, Aug 19, 2009 at 3:04 PM, Matt Quackenbush quackfu...@gmail.comwrote:


 The code would certainly help pinpoint exactly where the issue lies, but as
 the error message indicates, it is caused by the fact that somewhere in
 your
 code a variable is declared twice within a function.  This can be caused by
 several factors.  Here are a couple of examples that will do it.

 Ex. 1
 cffunction name=foo
cfargument name=bar /

cfset var bar =  /
 /cffunction


 Ex. 2
 cffunction name=foo
  cfscript
var err = ;

try {
   // code here
} catch (any err) {
}
  /cfscript
 /cffunction


 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325544
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cfcatch type= problem

2008-11-21 Thread Adrian Lynch
I'm caching some objects in an admin object and I serve these cached object
up in a method, admin.getService(myService). Some simplifed code:

cfif NOT StructKeyExists(VARIABLES.services, ARGUMENTS.service) OR
ARGUMENTS.refresh
cftry
cfset VARIABLES.services[ARGUMENTS.service] = 
CreateObject(component,
cfc.#ARGUMENTS.service#Service).init()
cfcatch type=any
cfthrow type= message=No such service: 
#ARGUMENTS.service#br
/#GetCurrentTemplatePath()#
/cfcatch
/cftry
/cfif

The try/catch is there to trap calls to service CFCs that don't exist.

admin.getService(notAService) will throw an exception:

No such service: notAService
C:\path\to\template.cfc

The trouble with the try catch is that it also traps errors in the service
object.

I've tried changing the type of the catch so I only catch the non-existent
CFC exceptions but none seem to work.

Any suggestions?

Thanks.

Adrian Lynch
http://www.halestorm.co.uk/
http://www.adrianlynch.co.uk/


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315758
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: cfcatch type= problem

2008-11-21 Thread Adrian Lynch
Thanks James!

I've changed the try/catch to:

cftry
cfset VARIABLES.services[ARGUMENTS.service] = CreateObject(component,
cfc.#ARGUMENTS.service#Service).init()
cfcatch type=any
cfif CFCATCH.Message EQ Could not find the ColdFusion 
Component or
Interface cfc.#ARGUMENTS.service#Service.
cfthrow type= message=No such service: 
#ARGUMENTS.service#br
/#GetCurrentTemplatePath()#
cfelse
cfrethrow
/cfif
/cfcatch
/cftry

This now throws my own exception when the service doesn't exist and let's
others through.

Ta.

Adrian
Building a database of ColdFusion errors at http://cferror.org/

-Original Message-
From: James Holmes
Sent: 21 November 2008 11:48
To: cf-talk
Subject: Re: cfcatch type= problem


You could examine cfcatch.message to see if it matches the type of
exception you want. If so, handle it, if not, use cfrethrow.

However, since your error handling is essentially just throwing your
own description of the same error, can you just allow the original
error to be thrown?

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/



2008/11/21 Adrian Lynch [EMAIL PROTECTED]:
 I'm caching some objects in an admin object and I serve these cached
object
 up in a method, admin.getService(myService). Some simplifed code:

 cfif NOT StructKeyExists(VARIABLES.services, ARGUMENTS.service) OR
 ARGUMENTS.refresh
cftry
cfset VARIABLES.services[ARGUMENTS.service] =
CreateObject(component,
 cfc.#ARGUMENTS.service#Service).init()
cfcatch type=any
cfthrow type= message=No such service:
#ARGUMENTS.service#br
 /#GetCurrentTemplatePath()#
/cfcatch
/cftry
 /cfif

 The try/catch is there to trap calls to service CFCs that don't exist.

 admin.getService(notAService) will throw an exception:

 No such service: notAService
 C:\path\to\template.cfc

 The trouble with the try catch is that it also traps errors in the service
 object.

 I've tried changing the type of the catch so I only catch the non-existent
 CFC exceptions but none seem to work.

 Any suggestions?

 Thanks.

 Adrian Lynch
 http://www.halestorm.co.uk/
 http://www.adrianlynch.co.uk/


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315760
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cfcatch

2008-07-17 Thread Brian Dumbledore
 I always thought any error generated can be cfdump'd by dumping 
 cfcatch obj. Every now and then I get [unknown type] when I dump 
 cfcatch and that always stumped me. However, when I output cfcatch.
 Message and cfcatch.Detail, they always work. What am I missing?? I 
 see it mostly on CFMX 

Charlie and Isaac,

Thanks for your time.. 
We do use CF8 now, but there are still clients from 6.1 through 8. I will apply 
the hotfix on the server. The structappend solution is interesting. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309234
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


cfcatch

2008-07-16 Thread Brian Dumbledore
I always thought any error generated can be cfdump'd by dumping cfcatch obj. 
Every now and then I get [unknown type] when I dump cfcatch and that always 
stumped me. However, when I output cfcatch.Message and cfcatch.Detail, they 
always work. What am I missing?? I see it mostly on CFMX 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309136
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cfcatch

2008-07-16 Thread Charlie Griefer
On Wed, Jul 16, 2008 at 6:58 AM, Brian Dumbledore [EMAIL PROTECTED]
wrote:

 I always thought any error generated can be cfdump'd by dumping cfcatch
 obj. Every now and then I get [unknown type] when I dump cfcatch and that
 always stumped me. However, when I output cfcatch.Message and
 cfcatch.Detail, they always work. What am I missing?? I see it mostly on
 CFMX


http://kb.adobe.com/selfservice/viewContent.do?externalId=1a9c83c


-- 
A byte walks into a bar and orders a pint. Bartender asks him What's
wrong? Byte says Parity error. Bartender nods and says Yeah, I thought
you looked a bit off.


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309143
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: cfcatch

2008-07-16 Thread s. isaac dealey
 I always thought any error generated can be cfdump'd by dumping
 cfcatch obj. Every now and then I get [unknown type] when I dump
 cfcatch and that always stumped me. However, when I output 
 cfcatch.Message and cfcatch.Detail, they always work. What am I
 missing?? I see it mostly on CFMX

There was a problem with some older versions of MX (I'm using 8 now) in
which cfcatch objects weren't always ... well they weren't always the
same kind of object I don't think... and occasionally the object would
misbehave like you're describing. 

It happened to me with such frequency that I actually created a function
that I shared with the community and also added into my open-source
libraries for ensuring that the cfcatch object would behave like a
structure the way it's supposed to. 

It's not a terribly complicated technique, but it's a pain to have to
always remember to wrap any caught error with that function and given
that I believe the problem has been resolved with more recent versions
(because I haven't been very faithful about applying my solution but
haven't been seeing those errors in a while), I removed the function
from my framework library last week or so... So it's kind of ironic to
me that you ask about this today, because I hadn't thought about this
problem in a while. :) 

Anyway, this was my solution: 

cfset copy = structNew() /
cfset structAppend(copy,cfcatch,true) /
cfset cfcatch = copy /

Don't ask me why structAppend worked when attempts to reference the keys
sometimes produced the is not a structure error. Maybe they were using
strict-typing. ;) 

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 781.769.0723

http://onTap.riaforge.org/blog



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309186
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cftry and cfcatch

2006-02-25 Thread John Lucania
Thank you so much, Pine et al.
It works wonderful.

jl

On 2/8/06, John McKown [EMAIL PROTECTED] wrote:
 Sounds like you do not want TRY/CATCH... that is triggered on a failure.
 You really want to use CFSWITCH/CFCASE.


 --

 John McKown
 President, Delaware.Net
 ICQ: 1812513
 We host Fusebox.org and all of our apps are Fusebox/ColdFusion/BlueDragon 
 compliant.



 John Lucania wrote:

 I have two queries:
 
 cfquery name=checksrv datasource=master
 SELECT @@SERVICENAME;
 /cfquery
 
 cfquery name=checkage datasource=master
 SELECT count (program_name)
 FROM master.dbo.sysprocesses
 WITH (NOLOCK)
 WHERE program_name LIKE '%Agent%'
 /cfquery
 
 I want to be notified through cfmail if
 
 1)
 query checksrv doesn't return MSSQLSERVER
  then,  MSSQLSERVER not returned in cfmail
 or
 query checkage doesn't return 2
  then, Agent not returned 2 in cfmail
 or
 both of checksrv and checkage  don't return
  then, MSSQLSERVER not returned and Agent not returned 2 in cfmail
 or
 
 2)
 query checksrv cannot be run
  then, MSSQLSERVER Not Avail in cfmail
 or
 query checkage cannot be run
  then, Agent Not Avail in cfmail
 or
 both of checksrv and checkage cannot be run
  then, MSSQLSERVER Not Avail and Agent Not Avail in cfmail.
 
 Any ideas?
 
 tia,
 
 jl
 
 

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233475
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: cftry and cfcatch

2006-02-08 Thread PINE Phyo Z
I'm guessing here but I think your two queries are using stored
procedures. So, use cfstoredproc to check the return values. Then, your
first issue will be resolved. Then use nested cftry and cfcatch for each
stored proc to resolve the second issue.

So probably something like this:

cftry 

!--- Set the variable for your second issue here. ---
cfset notRunQuery = 0 
cfset problemQueryNumber = 0

 cftry
cfstoredproc name=checksrv datasource=master
returnCode=YES result=storedProc1Return
SELECT @@SERVICENAME;
/cfstoredproc


 cfcatch type = database

cfset notRunQuery = notRunQuery + 1 
cfset problemQueryNumber = 1

cfthrow type = yourOwnError

 /cfcatch

 /cftry

 cftry
cfstoredproc name=checkage datasource=master
returnCode=YES result=storedProc2Return
SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'
/cfstoredproc


 cfcatch type = database

cfset notRunQuery = notRunQuery + 1 
cfset problemQueryNumber = 2

!--- Throw your own error for the outermost cfcatch to catch
---
cfthrow type = yourOwnError

 /cfcatch

 /cftry

 cfcatch type =yourOwnError

cfif notRunQuery is 2

 !--- Send MSSQLSERVER Not Avail and Agent Not Avail in
cfmail. ---

  cfelseif notRunQuery is 1
cfif problemQueryNumber = 1 
!--- Send MSSQLSERVER Not Avail in cfmail.
---
cfelseif problemQueryNumber = 2
 !--- Send Agent Not Avail in cfmail. ---
/cfif
/cfif 

 /cfcatch 
/cftry

!--- 
Check the errors(return values) with from two stored
procedures. 
Do CFMail here by checking two return structs
(storedProc1Return and storedProc2Return) 
---



HTH,

Pine

-Original Message-
From: John Lucania [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 07, 2006 6:00 PM
To: CF-Talk
Subject: cftry and cfcatch


I have two queries:

cfquery name=checksrv datasource=master
SELECT @@SERVICENAME;
/cfquery

cfquery name=checkage datasource=master
SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'
/cfquery

I want to be notified through cfmail if

1)
query checksrv doesn't return MSSQLSERVER
 then,  MSSQLSERVER not returned in cfmail
or
query checkage doesn't return 2
 then, Agent not returned 2 in cfmail
or
both of checksrv and checkage  don't return
 then, MSSQLSERVER not returned and Agent not returned 2 in
cfmail or

2)
query checksrv cannot be run
 then, MSSQLSERVER Not Avail in cfmail
or
query checkage cannot be run
 then, Agent Not Avail in cfmail
or
both of checksrv and checkage cannot be run
 then, MSSQLSERVER Not Avail and Agent Not Avail in cfmail.

Any ideas?

tia,

jl



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231649
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: cftry and cfcatch

2006-02-08 Thread PINE Phyo Z
I was in a hurry when I typed the previous response and found a glitch
in the logic. In the inner cfcatch blocks, I am throwing the errors. So,
whenever there is a problem, the yourOwnError exception will be
thrown. That means you will never see  Send MSSQLSERVER Not Avail and
Agent Not Avail in cfmail. 

To resolve that, at the top of my head, just remove the cfthrow tags
in the cfcatch blocks. Handle it outside the cftry and cfcatch. I don't
think you would even need to nest the cftry anymore. So, the revised
version will be like this:

!--- Set the variable for your second issue here. ---
cfset notRunQuery = 0 
cfset problemQueryNumber = 0

 cftry
cfstoredproc name=checksrv datasource=master
returnCode=YES result=storedProc1Return
SELECT @@SERVICENAME;
/cfstoredproc


 cfcatch type = database

cfset notRunQuery = notRunQuery + 1 
cfset problemQueryNumber = 1

 /cfcatch

 /cftry

 cftry
cfstoredproc name=checkage datasource=master
returnCode=YES result=storedProc2Return
SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'
/cfstoredproc


 cfcatch type = database

cfset notRunQuery = notRunQuery + 1 
cfset problemQueryNumber = 2


 /cfcatch

 /cftry


cfif notRunQuery is 2

 !--- Send MSSQLSERVER Not Avail and Agent Not Avail in
cfmail. ---

  cfelseif notRunQuery is 1
cfif problemQueryNumber = 1 
!--- Send MSSQLSERVER Not Avail in cfmail.
---
cfelseif problemQueryNumber = 2
 !--- Send Agent Not Avail in cfmail. ---
/cfif
/cfif 



!--- 
Check the errors(return values) with from two stored
procedures. 
Do CFMail here by checking two return structs
(storedProc1Return and storedProc2Return) 
---


-Original Message-
From: PINE Phyo Z 
Sent: Wednesday, February 08, 2006 8:53 AM
To: 'cf-talk@houseoffusion.com'
Subject: RE: cftry and cfcatch


I'm guessing here but I think your two queries are using stored
procedures. So, use cfstoredproc to check the return values. Then, your
first issue will be resolved. Then use nested cftry and cfcatch for each
stored proc to resolve the second issue.

So probably something like this:

cftry 

!--- Set the variable for your second issue here. ---
cfset notRunQuery = 0 
cfset problemQueryNumber = 0

 cftry
cfstoredproc name=checksrv datasource=master
returnCode=YES result=storedProc1Return
SELECT @@SERVICENAME;
/cfstoredproc


 cfcatch type = database

cfset notRunQuery = notRunQuery + 1 
cfset problemQueryNumber = 1

cfthrow type = yourOwnError

 /cfcatch

 /cftry

 cftry
cfstoredproc name=checkage datasource=master
returnCode=YES result=storedProc2Return
SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'
/cfstoredproc


 cfcatch type = database

cfset notRunQuery = notRunQuery + 1 
cfset problemQueryNumber = 2

!--- Throw your own error for the outermost cfcatch to catch
---
cfthrow type = yourOwnError

 /cfcatch

 /cftry

 cfcatch type =yourOwnError

cfif notRunQuery is 2

 !--- Send MSSQLSERVER Not Avail and Agent Not Avail in
cfmail. ---

  cfelseif notRunQuery is 1
cfif problemQueryNumber = 1 
!--- Send MSSQLSERVER Not Avail in cfmail.
---
cfelseif problemQueryNumber = 2
 !--- Send Agent Not Avail in cfmail. ---
/cfif
/cfif 

 /cfcatch 
/cftry

!--- 
Check the errors(return values) with from two stored
procedures. 
Do CFMail here by checking two return structs
(storedProc1Return and storedProc2Return) 
---



HTH,

Pine

-Original Message-
From: John Lucania [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 07, 2006 6:00 PM
To: CF-Talk
Subject: cftry and cfcatch


I have two queries:

cfquery name=checksrv datasource=master
SELECT @@SERVICENAME;
/cfquery

cfquery name=checkage datasource=master
SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'
/cfquery

I want to be notified through cfmail if

1)
query checksrv doesn't return MSSQLSERVER
 then,  MSSQLSERVER not returned in cfmail
or
query checkage doesn't return 2
 then, Agent not returned 2 in cfmail
or
both of checksrv

Re: cftry and cfcatch

2006-02-08 Thread John McKown
Sounds like you do not want TRY/CATCH... that is triggered on a failure.
You really want to use CFSWITCH/CFCASE.


-- 

John McKown
President, Delaware.Net
ICQ: 1812513
We host Fusebox.org and all of our apps are Fusebox/ColdFusion/BlueDragon 
compliant.



John Lucania wrote:

I have two queries:

cfquery name=checksrv datasource=master
SELECT @@SERVICENAME;
/cfquery

cfquery name=checkage datasource=master
SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'
/cfquery

I want to be notified through cfmail if

1)
query checksrv doesn't return MSSQLSERVER
 then,  MSSQLSERVER not returned in cfmail
or
query checkage doesn't return 2
 then, Agent not returned 2 in cfmail
or
both of checksrv and checkage  don't return
 then, MSSQLSERVER not returned and Agent not returned 2 in cfmail
or

2)
query checksrv cannot be run
 then, MSSQLSERVER Not Avail in cfmail
or
query checkage cannot be run
 then, Agent Not Avail in cfmail
or
both of checksrv and checkage cannot be run
 then, MSSQLSERVER Not Avail and Agent Not Avail in cfmail.

Any ideas?

tia,

jl



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231703
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


cftry and cfcatch

2006-02-07 Thread John Lucania
I have two queries:

cfquery name=checksrv datasource=master
SELECT @@SERVICENAME;
/cfquery

cfquery name=checkage datasource=master
SELECT count (program_name)
FROM master.dbo.sysprocesses
WITH (NOLOCK)
WHERE program_name LIKE '%Agent%'
/cfquery

I want to be notified through cfmail if

1)
query checksrv doesn't return MSSQLSERVER
 then,  MSSQLSERVER not returned in cfmail
or
query checkage doesn't return 2
 then, Agent not returned 2 in cfmail
or
both of checksrv and checkage  don't return
 then, MSSQLSERVER not returned and Agent not returned 2 in cfmail
or

2)
query checksrv cannot be run
 then, MSSQLSERVER Not Avail in cfmail
or
query checkage cannot be run
 then, Agent Not Avail in cfmail
or
both of checksrv and checkage cannot be run
 then, MSSQLSERVER Not Avail and Agent Not Avail in cfmail.

Any ideas?

tia,

jl

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231628
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


CF performance tuning: CFTRY/CFCATCH vs CFERROR? What about excessive CFOUTPUTs?

2005-12-29 Thread Reed Powell
Hello all - I've googled the heck out of this topic, and there are more
opinions than I can count!  Is there any definitive info on whether it is
more efficient to put a CFTRY around an entire page's contents, with a
CFCATCH at the end to trap errors, or to simply have a CFERROR page
specified in application.cfm (and only use CFTRY/CFCATCH in specific pieces
of code that might need special error handling procedures)?  In other words,
what is the performance cost for code that is executing within a CFTRY
block?

I'm interested in this because the CF server that I've just recently started
working with seems to be having periodic performance problems (still trying
to determine what periodic actually means), and noticed that a lot of the
application's pages have a single CFTRY around them.

I've also noticed excessive use of CFOUTPUT tags.  Is it worth consolidating
these to help performance?  I've seen as many as 5 in a block of code that's
only 30 lines long, where only 1 was needed.

What about excessive # marks?  It makes me crazy to see code like
cfif #somevariable# eq yes ...
But does that also make CF crazy?  I'd think that this goofiness would not
actually filter down to the Jrun code that actually executes, right?

Any good MX7 performance/tuning papers running around?  I checked on the
macromedia website, and with google, but only found info on older versions.

TIA for any hints!
Reed




~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227949
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CF performance tuning: CFTRY/CFCATCH vs CFERROR? What about excessive CFOUTPUTs?

2005-12-29 Thread Nathan Strutz
The try/catch vs cferror page - it's really about what works best for
you, what is more manageable, and what gives the best results for you.
Try/catch isn't really made for wrapping whole pages, but it won't
cause errors or problems. It's just not as manageable as cferror.

Same with multiple cfoutputs and over-usage of #'s. When it gets
translated down into java, it really doesn't matter anymore.

If there is a performance benifit, it happens when the page is parsed
(once per template, until it is modified next or the service
restarts).

The real issue is what is most readable and manageable for you, the developer.

As for your servers, make sure your server is all patched up and has
the latest database drivers, otherwise, it's a little hard to say from
the info you gave us

-nathan strutz
http://www.dopefly.com/



On 12/29/05, Reed Powell [EMAIL PROTECTED] wrote:
 Hello all - I've googled the heck out of this topic, and there are more
 opinions than I can count!  Is there any definitive info on whether it is
 more efficient to put a CFTRY around an entire page's contents, with a
 CFCATCH at the end to trap errors, or to simply have a CFERROR page
 specified in application.cfm (and only use CFTRY/CFCATCH in specific pieces
 of code that might need special error handling procedures)?  In other words,
 what is the performance cost for code that is executing within a CFTRY
 block?

 I'm interested in this because the CF server that I've just recently started
 working with seems to be having periodic performance problems (still trying
 to determine what periodic actually means), and noticed that a lot of the
 application's pages have a single CFTRY around them.

 I've also noticed excessive use of CFOUTPUT tags.  Is it worth consolidating
 these to help performance?  I've seen as many as 5 in a block of code that's
 only 30 lines long, where only 1 was needed.

 What about excessive # marks?  It makes me crazy to see code like
 cfif #somevariable# eq yes ...
 But does that also make CF crazy?  I'd think that this goofiness would not
 actually filter down to the Jrun code that actually executes, right?

 Any good MX7 performance/tuning papers running around?  I checked on the
 macromedia website, and with google, but only found info on older versions.

 TIA for any hints!
 Reed




 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227953
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CF performance tuning: CFTRY/CFCATCH vs CFERROR? What about e xcessive CFOUTPUTs?

2005-12-29 Thread Dave Watts
 Is there any definitive info on whether it is more efficient 
 to put a CFTRY around an entire page's contents, with a
 CFCATCH at the end to trap errors, or to simply have a CFERROR 
 page specified in application.cfm (and only use CFTRY/CFCATCH in 
 specific pieces of code that might need special error handling
 procedures)? In other words, what is the performance cost for 
 code that is executing within a CFTRY block?
 
 I'm interested in this because the CF server that I've just 
 recently started working with seems to be having periodic 
 performance problems (still trying to determine what periodic 
 actually means), and noticed that a lot of the application's 
 pages have a single CFTRY around them.

I think you're asking the wrong question. I seriously doubt whether there
are any significant performance implications one way or the other. However,
wrapping a CFTRY around a page is bad, bad, bad! That's not what it's for -
that's why we have CFERROR. Wrapping a CFTRY around a page prevents you from
using CFTRY usefully within that page. The purpose of exception handling is
to let you identify and trap specific problems, and provide specific
solutions for those problems. When you wrap the entire page in CFTRY, your
problem could be on line 2 or line 200. Plus, it means that you have to
manage generalized error handling within each page, which is unnecessarily
complicated.

 I've also noticed excessive use of CFOUTPUT tags. Is it worth 
 consolidating these to help performance? I've seen as many as 
 5 in a block of code that's only 30 lines long, where only 1 
 was needed.

I doubt you'd see any significant difference here, either.
 
 What about excessive # marks?  It makes me crazy to see code like
   cfif #somevariable# eq yes ...
 But does that also make CF crazy?  I'd think that this 
 goofiness would not actually filter down to the Jrun code that 
 actually executes, right?

I don't think this makes any significant difference either.

 Any good MX7 performance/tuning papers running around? I 
 checked on the macromedia website, and with google, but only 
 found info on older versions.

To the extent that those older versions address CFMX 6.1, they should still
be largely valid for 7. There isn't that much difference, really. In
general, you're far more likely to improve performance by examining data
access and caching more closely.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227954
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CF performance tuning: CFTRY/CFCATCH vs CFERROR? What about excessive CFOUTPUTs?

2005-12-29 Thread John Paul Ashenfelter
On 12/29/05, Reed Powell [EMAIL PROTECTED] wrote:
 Hello all - I've googled the heck out of this topic, and there are more
 opinions than I can count!  Is there any definitive info on whether it is
 more efficient to put a CFTRY around an entire page's contents, with a
 CFCATCH at the end to trap errors, or to simply have a CFERROR page
 specified in application.cfm (and only use CFTRY/CFCATCH in specific pieces
 of code that might need special error handling procedures)?  In other words,
 what is the performance cost for code that is executing within a CFTRY
 block?

I'd go with the CFERROR and specific CFTRY/CATCH regardless of
performance details.

 I'm interested in this because the CF server that I've just recently started
 working with seems to be having periodic performance problems (still trying
 to determine what periodic actually means), and noticed that a lot of the
 application's pages have a single CFTRY around them.

In general with performance optimization, you figure out what you're
working on -- without a good idea about *what* the issue is, you're
shooting in the dark and just as likely to cause newer/different
problems.

I'd start by turning on slow page logging and slow query logging (if
you db supports) as well to start. If you see pages that are
consistently problematic, you know where to start spending some time
-- if it seems truly random, you probably want to do some
process/cpu/etc monitoring to see if its *another* process (e.g. the
automatic virus scanner someone installed) that's eating your
performance.

And of course you need to cross-index this with load.

As far as noticing a lot of CFTRY around entire pages, that to me
seems like it's a bad idea as a general practice -- but you should get
*consistent* performance, even if it's slower.


 I've also noticed excessive use of CFOUTPUT tags.  Is it worth consolidating
 these to help performance?  I've seen as many as 5 in a block of code that's
 only 30 lines long, where only 1 was needed.


 What about excessive # marks?  It makes me crazy to see code like
 cfif #somevariable# eq yes ...
 But does that also make CF crazy?  I'd think that this goofiness would not
 actually filter down to the Jrun code that actually executes, right?

Once you're compiled down to java classes, a lot of this stuff is
irrelevant. Again, I think you're looking in the wrong place -- you
don't even know for a fact that it's ColdFusion that's causing your
problem.

 Any good MX7 performance/tuning papers running around?  I checked on the
 macromedia website, and with google, but only found info on older versions.

There are lots of things you can do to change performance -- move SQL
to stored procs, cache things, tune the JVM, etc, etc. But all of it
is pointless until you can narrow down *what* and *where* your problem
is -- everything else is code-and-hope.

In my experience, sporadic performance problems have nothing to do
with cfoutput style, # marks, etc and far more with
bad/poor/inefficient SQL (#1 issue with CF code imho). Or with other
processes running on the server/network segment you forgot about (the
massive backup that runs hourly, the automatic defragger/etc someone
set up, the daily email blast that saturates your outbound pipe, etc).


--
John Paul Ashenfelter
CTO/Transitionpoint
(blog) http://www.ashenfelter.com
(email) [EMAIL PROTECTED]

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227956
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CF performance tuning: CFTRY/CFCATCH vs CFERROR? What about e xcessive CFOUTPUTs?

2005-12-29 Thread Matt Robertson
On 12/29/05, Dave Watts [EMAIL PROTECTED] wrote:
 However,
 wrapping a CFTRY around a page is bad, bad, bad! That's not what it's for -
 that's why we have CFERROR.

As obsessed as I am about error handling, it unfortunately took me a
long time to learn this, and I am still pulling try/catch statements
out of old code I come across.  I did it for years.  With that in
mind...

 Wrapping a CFTRY around a page prevents you from
 using CFTRY usefully within that page.

Actually you can nest try/catch (wrap whole page, with individual code
blocks wrapped inside of that) and its not a problem, although as you
say its a dumb thing to do, once you know better.

 When you wrap the entire page in CFTRY, your
 problem could be on line 2 or line 200.

Yes indeed, but cfcatch-scope variables will tell you precisely where
the error occurred, and why, just like you'd get with an error-scope
message.  Pretty sure you even get a stack trace so you can drill down
to the include or module that *really* caused the problem.

--
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227957
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CF performance tuning: CFTRY/CFCATCH vs CFERROR? What about e xcessive CFOUTPUTs?

2005-12-29 Thread Dave Watts
 Actually you can nest try/catch (wrap whole page, with individual code
 blocks wrapped inside of that) and its not a problem, although as you
 say its a dumb thing to do, once you know better.

Sure, you can do that. But it adds unnecessary complication to error
handling, and can cause some odd problems. For example, if you write an
exception handler that doesn't know what to do with the exception it's
caught, it should kick the exception to a higher level. If that higher level
is your page-wide exception handler, it might not be able to respond in an
especially useful manner, since it's written to deal with anything that
happens within the entire page.

 Yes indeed, but cfcatch-scope variables will tell you precisely where
 the error occurred, and why, just like you'd get with an error-scope
 message.  Pretty sure you even get a stack trace so you can drill down
 to the include or module that *really* caused the problem.

Yes, the exception itself will provide descriptive information, which is
good to have after the fact. But one of the primary purposes of exception
handling is to deal with problems as they occur, and to do this you have to
have a pretty good idea in advance of what kinds of problems you can expect.
Wrapping an entire page in CFTRY indicates that you don't actually have any
idea what's going to go wrong, and can't really do anything other than
report the exceptions it receives.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227958
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


cftry/cfcatch - what the heck?

2005-11-11 Thread John Beynon
ok, here's a chunk of code;

cftryPrices: 
pound;#numberformat(application.siteCodes.sitecode[thissitecode].pricerange.minprice)#
- 
pound;#numberformat(application.siteCodes.sitecode[thissitecode].pricerange.maxprice)#/p
cfcatch!--- invisibly catch errors---/cfcatch/cftry

If the data is not present in the application scope what would you
expect to see?

1. Nothing
2. Prices:

In all my dealings previously if the cftry fails then it all fails and
then the cfcatch handles it - why then am I seeing Prices: displayed
on my screen

thanks,

john.

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223937
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cftry/cfcatch - what the heck?

2005-11-11 Thread Ryan Guill
It sounds like the data does not exist in the variable, but that the
variable does exist... is that possible?

A better way to do that would be to use structKeyExists() around your
variables and test for them first.


On 11/11/05, John Beynon [EMAIL PROTECTED] wrote:
 ok, here's a chunk of code;

 cftryPrices: 
 pound;#numberformat(application.siteCodes.sitecode[thissitecode].pricerange.minprice)#
 - 
 pound;#numberformat(application.siteCodes.sitecode[thissitecode].pricerange.maxprice)#/p
 cfcatch!--- invisibly catch errors---/cfcatch/cftry

 If the data is not present in the application scope what would you
 expect to see?

 1. Nothing
 2. Prices:

 In all my dealings previously if the cftry fails then it all fails and
 then the cfcatch handles it - why then am I seeing Prices: displayed
 on my screen

 thanks,

 john.

 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223939
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cftry/cfcatch - what the heck?

2005-11-11 Thread John Beynon
nevermind, senior moment - need more coffee!

 ok, here's a chunk of code;
 
 cftryPrices: pound;#numberformat(application.siteCodes.
 sitecode[thissitecode].pricerange.minprice)#
 - pound;#numberformat(application.siteCodes.sitecode[thissitecode].
 pricerange.maxprice)#/p
 cfcatch!--- invisibly catch errors---/cfcatch/cftry
 
 If the data is not present in the application scope what would you
 expect to see?
 
 1. Nothing
 2. Prices:
 
 In all my dealings previously if the cftry fails then it all fails 
 and
 then the cfcatch handles it - why then am I seeing Prices: displayed
 on my screen
 
 thanks,
 
 john.

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223940
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cftry/cfcatch - what the heck?

2005-11-11 Thread Sean Corfield
On 11/11/05, John Beynon [EMAIL PROTECTED] wrote:
 ok, here's a chunk of code;

 cftryPrices: 
 pound;#numberformat(application.siteCodes.sitecode[thissitecode].pricerange.minprice)#
 - 
 pound;#numberformat(application.siteCodes.sitecode[thissitecode].pricerange.maxprice)#/p
 cfcatch!--- invisibly catch errors---/cfcatch/cftry

 If the data is not present in the application scope what would you
 expect to see?

 1. Nothing
 2. Prices:

(2) because the output of the string Prices: succeeds and then the
next piece of code fails. cfcatch doesn't rollback execution of any
successful code that was executed prior to the exception being thrown.

(Just in case others are puzzled by this, since John didn't explain
*why* he's not still looking for a solution)
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223959
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFCs and cftry/cfcatch

2005-10-13 Thread Andy
Are you sure an error is being thrown?  I recommend you comment all code out
betweent the CFTRY and CFCatch  and add a CFTHROW to force a specific
error type.   

-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 12, 2005 9:26 PM
To: CF-Talk
Subject: Re: CFCs and cftry/cfcatch

exactly what I'm doing Kenand I think I have it all working now (didn't
have cfreturn as part of my catchtry when the remote machine connection is
restored)DOH!

I'm having one of thse days today ;-)

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220873
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-13 Thread Rob Richardson
Bryan--- I'm coming in on the tail end of this conversation, but noticed in 
your code sample that you were trying to cfdump the cfcatch structure.  I ran 
into problems with cfdump/cfcatch that was ultimately confirmed by Macromedia 
to be a bug in CFMX6.1 that isn't corrected by one of their hot fixes and I'm 
having to hack around since we won't be moving to 7.0 anythime soon.  See 
thread 
(http://www.houseoffusion.com/cf_lists/messages.cfm/forumid:4/threadid:42124#217681)
 for details.  I'll update that thread with the response from MM.  Good luck 
with this.--- Rob

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220894
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cfcatch/cfdump weirdness

2005-10-13 Thread Rob Richardson
All--- This is a bug confirmed by Macromedia, but not resolved, as follows.  I 
have  to hack around this until (IF) they fix it.  I'll update CFBugHunt too.  
Thanks.--- Rob

 Bill Sahlas [EMAIL PROTECTED] 9/9/2005 11:05:18 AM 
I was able to reproduce the problem using the tests that you provided.  This is 
a bug in CF 6.1.  However, it has been fixed in CF 7.0, i.e. I  see all the 
output beyond the cfcatch.  I can enter this as a bug against 6.1 and I am 
curious to know if you can move to CF 7.0 to resolve this OR can you work 
around this OR how should we proceed?  We often patch CF 6.1 for customers 
under support agreement.  Do you have a
support agreement contract with Macromedia?  We will work to have this 
resolved.  Thanks for the report.  Bug entry on your behalf is #61103.

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220897
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFCs and cftry/cfcatch

2005-10-13 Thread Kerry
I thought there was a patch for this?
http://www.macromedia.com/go/1a9c83c

Or are you referring to another bug?

-Original Message-
From: Rob Richardson [mailto:[EMAIL PROTECTED]
Sent: 13 October 2005 15:17
To: CF-Talk
Subject: Re: CFCs and cftry/cfcatch


Bryan--- I'm coming in on the tail end of this conversation, but noticed in
your code sample that you were trying to cfdump the cfcatch structure.  I
ran into problems with cfdump/cfcatch that was ultimately confirmed by
Macromedia to be a bug in CFMX6.1 that isn't corrected by one of their hot
fixes and I'm having to hack around since we won't be moving to 7.0 anythime
soon.  See thread
(http://www.houseoffusion.com/cf_lists/messages.cfm/forumid:4/threadid:42124
#217681) for details.  I'll update that thread with the response from MM.
Good luck with this.--- Rob



~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220901
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-13 Thread Rob Richardson
I have 6.1, with updater  hot fixes, including 1a9c83c.  MM confirmed this bug 
is in addition to list of known updater issues posted on their site.  This bug 
is not yet listed online.

I thought there was a patch for this?
http://www.macromedia.com/go/1a9c83c

Or are you referring to another bug?

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220921
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
Hey All,

I'm having some issues trying to get a try/catch block to work correctly (i.e. 
doesn't catch a dang thing) in a method in one of my CFCs.  I haven't tried 
this before...are there any gotchas? can it be done (don't see why not)?

TIA

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220829
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFCs and cftry/cfcatch

2005-10-12 Thread Kerry
try catch definitely works in a cfc.
can you post your code?

-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: 12 October 2005 18:37
To: CF-Talk
Subject: CFCs and cftry/cfcatch


Hey All,

I'm having some issues trying to get a try/catch block to work correctly
(i.e. doesn't catch a dang thing) in a method in one of my CFCs.  I haven't
tried this before...are there any gotchas? can it be done (don't see why
not)?

TIA

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220830
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread John C. Bland II
cffunction name=blah
cftry
!--- do stuff here ---
cfcatch type=any!--- handle error ---/cfcatch
/cftry
/cffunction

Do you have something like that? We do cftry/catch in cfc's all of the time.

On 10/12/05, Bryan Stevenson [EMAIL PROTECTED] wrote:

 Hey All,

 I'm having some issues trying to get a try/catch block to work correctly (
 i.e. doesn't catch a dang thing) in a method in one of my CFCs. I haven't
 tried this before...are there any gotchas? can it be done (don't see why
 not)?

 TIA

 Cheers

 Bryan Stevenson B.Comm.
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 phone: 250.480.0642
 fax: 250.480.1264
 cell: 250.920.8830
 e-mail: [EMAIL PROTECTED]
 web: www.electricedgesystems.com http://www.electricedgesystems.com

 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220832
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
Thanks KerryI may have a different problem than I thoughtif I don't 
get it sorted ASAP I'll fire up the code and see what the list has to say 
;-)

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
- Original Message - 
From: Kerry [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Wednesday, October 12, 2005 10:40 AM
Subject: RE: CFCs and cftry/cfcatch


 try catch definitely works in a cfc.
 can you post your code?

 -Original Message-
 From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
 Sent: 12 October 2005 18:37
 To: CF-Talk
 Subject: CFCs and cftry/cfcatch


 Hey All,

 I'm having some issues trying to get a try/catch block to work correctly
 (i.e. doesn't catch a dang thing) in a method in one of my CFCs.  I 
 haven't
 tried this before...are there any gotchas? can it be done (don't see why
 not)?

 TIA

 Cheers

 Bryan Stevenson B.Comm.
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 phone: 250.480.0642
 fax: 250.480.1264
 cell: 250.920.8830
 e-mail: [EMAIL PROTECTED]
 web: www.electricedgesystems.com



 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220833
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
OK...I give uphere's the code:

  cffunction name=getHail access=remote returntype=query 
output=false hint=Retrieves a core hail out record (hail 
numbers/licences/trip types/periods can be retrieved via other available 
methods). If a hailID and hailNumber are passed in, the hailID will be used 
instead of the hailNumber

cfargument name=user type=string   required=yes
  cfargument name=pwd  type=string   required=yes
cfargument name=hailNum  type=numeric  required=yes 
hint=hail number of desired hail record (pass a zero if you want to ignore 
this argument)
cfargument name=hailID   type=numeric  required=yes 
hint=activity ID of desired hail record (pass a zero if you want to ignore 
this argument)
cfargument name=hailType type=string   required=yes 
hint=type of hail (valid values are OUT and IN)

cftry

  !--- we will lookup hail by activity ID for provided hail number - 
lookup activity ID ---
  cfif Len(Trim(ARGUMENTS.hailNum)) AND NOT 
Len(Trim(ARGUMENTS.hailID))

cfquery name=qGetActID datasource=#datasource# 
username=#ARGUMENTS.user# password=#ARGUMENTS.pwd#
  SELECT act_act_id
FROM #oschema#.hail_number
   WHERE haiul_no = cfqueryparam value=#ARGUMENTS.hailNum# 
cfsqltype=CF_SQL_NUMERIC
   /cfquery
cfset activityID = qGetActID.act_act_id

  !--- hail number and hail ID (activity ID) passed to method - ignore 
hail number and use hail ID to lookup hail ---
  cfelseif Len(Trim(ARGUMENTS.hailNum)) AND 
Len(Trim(ARGUMENTS.hailID))
cfset activityID = ARGUMENTS.hailID
  /cfif

  !--- lookup hail out record ---
  cfif Trim(ARGUMENTS.hailType) eq OUT
cfset qGetHail = 
CreateObject(component,appcfcs.fos.hails).getHailOuty(ARGUMENTS.user,ARGUMENTS.pwd,activityID)
  !--- lookup hail in record ---
  cfelseif Trim(ARGUMENTS.hailType) eq IN
cfset qGetHail = 
CreateObject(component,appcfcs.fos.hails).getHailIn(ARGUMENTS.user,ARGUMENTS.pwd,activityID)
  /cfif

  cfreturn qGetHail

  cfcatch type=any
   !---  cfset qGetHail = packageError(cfcatch.errorMessage) ---
cfdump var=#cfcatch#cfabort
  /cfcatch

/cftry

  /cffunction

I have forced an error by calling getHailOuty instead of getHailOut 
(this condition is met cfif Trim(ARGUMENTS.hailType) eq OUT).  The 
cfcatch does NOT fire off and no dump of cfcatch scope occursinstead I 
get a standard fairly useless CF webservice error.

Anybody?

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220836
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
Bugger!!  I think I may have figured it out...there is a site-wide error 
handler in place that may be messing with the try/catch *insert my red face 
here*.  I'll check into itbut in the meantime if anyone sees a problem 
with my code...feel free to enlighten me ;-)

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220838
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFCs and cftry/cfcatch

2005-10-12 Thread Ian Skinner
Bugger!!  I think I may have figured it out...there is a site-wide error 
handler in place that may be messing with the try/catch *insert my red face 
here*.  I'll check into itbut in the meantime if anyone sees a problem 
with my code...feel free to enlighten me ;-)

Cheers

Well the one thing I noticed is that you have output=false on the function, 
this blocks all output, even cfdumps.  So you need to either temporarily turn 
on the output, or return the error to the calling code in some way.




--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
C code. C code run. Run code run. Please!
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220840
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
 Well the one thing I noticed is that you have output=false on the 
 function, this blocks all output, even cfdumps.  So you need to either 
 temporarily turn on the output, or return the error to the calling code in 
 some way.

and this is why you show your codeto find the stupid things you shoulda 
seen ;-)

I'll give that a whirl

FYI there is s site-wide error handlerturned it off and found there is 
some other error handler that I can't find (previous developer)so I'm 
still tracking that down.

Bah...all this for something that should be so simple ;-)

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
- Original Message - 
From: Ian Skinner [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Wednesday, October 12, 2005 11:08 AM
Subject: RE: CFCs and cftry/cfcatch


 Bugger!!  I think I may have figured it out...there is a site-wide error
 handler in place that may be messing with the try/catch *insert my red 
 face
 here*.  I'll check into itbut in the meantime if anyone sees a problem
 with my code...feel free to enlighten me ;-)

 Cheers

 Well the one thing I noticed is that you have output=false on the 
 function, this blocks all output, even cfdumps.  So you need to either 
 temporarily turn on the output, or return the error to the calling code in 
 some way.




 --
 Ian Skinner
 Web Programmer
 BloodSource
 www.BloodSource.org
 Sacramento, CA

 C code. C code run. Run code run. Please!
 - Cynthia Dunning

 Confidentiality Notice:  This message including any
 attachments is for the sole use of the intended
 recipient(s) and may contain confidential and privileged
 information. Any unauthorized review, use, disclosure or
 distribution is prohibited. If you are not the
 intended recipient, please contact the sender and
 delete any copies of this message.




 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220841
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFCs and cftry/cfcatch

2005-10-12 Thread Ian Skinner
FYI there is s site-wide error handlerturned it off and found there is 
some other error handler that I can't find (previous developer)so I'm 
still tracking that down.

Look for cferror tags as well as other cftry blocks that may be surrounding 
this code, especially in included templates such as application.cfm. 


--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
C code. C code run. Run code run. Please!
- Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220843
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
Yes John...exactly like your example (I'm not new to try/catchjust 
haven't used inside  a cffunction before).  The weird part is the catch 
doesn't fire off ;-)

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220846
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
 Look for cferror tags as well as other cftry blocks that may be 
 surrounding this code, especially in included templates such as 
 application.cfm.

First thing I didnada ;-)

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
- Original Message - 
From: Ian Skinner [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Wednesday, October 12, 2005 11:25 AM
Subject: RE: CFCs and cftry/cfcatch


 FYI there is s site-wide error handlerturned it off and found there is
 some other error handler that I can't find (previous developer)so I'm
 still tracking that down.

 Look for cferror tags as well as other cftry blocks that may be 
 surrounding this code, especially in included templates such as 
 application.cfm.


 --
 Ian Skinner
 Web Programmer
 BloodSource
 www.BloodSource.org
 Sacramento, CA

 C code. C code run. Run code run. Please!
 - Cynthia Dunning

 Confidentiality Notice:  This message including any
 attachments is for the sole use of the intended
 recipient(s) and may contain confidential and privileged
 information. Any unauthorized review, use, disclosure or
 distribution is prohibited. If you are not the
 intended recipient, please contact the sender and
 delete any copies of this message.




 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220850
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread Ken Ferguson
So, when I want to use a try/catch in a function, I usually do it like this:


cfunction
cfargument
cfset var 
cftry
do stuff
cfcatch
cfreturn cfcatch
/cfcatch
cfreturn intededReturnVariable
/cffunction

This way, if I do catch an error I'm returning the cfcatch info. I guess 
you will have to do something a little different since you're returntype 
is set to query. I guess you could create a query object from the 
cfcatch information to return. Also, you're just doing an output-style 
dump, but your cffunction tag has output=false. I'm thinking that's 
not what you want to do.

--Ferg


Bryan Stevenson wrote:

OK...I give uphere's the code:

  cffunction name=getHail access=remote returntype=query 
output=false hint=Retrieves a core hail out record (hail 
numbers/licences/trip types/periods can be retrieved via other available 
methods). If a hailID and hailNumber are passed in, the hailID will be used 
instead of the hailNumber

cfargument name=user type=string   required=yes
  cfargument name=pwd  type=string   required=yes
cfargument name=hailNum  type=numeric  required=yes 
hint=hail number of desired hail record (pass a zero if you want to ignore 
this argument)
cfargument name=hailID   type=numeric  required=yes 
hint=activity ID of desired hail record (pass a zero if you want to ignore 
this argument)
cfargument name=hailType type=string   required=yes 
hint=type of hail (valid values are OUT and IN)

cftry

  !--- we will lookup hail by activity ID for provided hail number - 
lookup activity ID ---
  cfif Len(Trim(ARGUMENTS.hailNum)) AND NOT 
Len(Trim(ARGUMENTS.hailID))

cfquery name=qGetActID datasource=#datasource# 
username=#ARGUMENTS.user# password=#ARGUMENTS.pwd#
  SELECT act_act_id
FROM #oschema#.hail_number
   WHERE haiul_no = cfqueryparam value=#ARGUMENTS.hailNum# 
cfsqltype=CF_SQL_NUMERIC
   /cfquery
cfset activityID = qGetActID.act_act_id

  !--- hail number and hail ID (activity ID) passed to method - ignore 
hail number and use hail ID to lookup hail ---
  cfelseif Len(Trim(ARGUMENTS.hailNum)) AND 
Len(Trim(ARGUMENTS.hailID))
cfset activityID = ARGUMENTS.hailID
  /cfif

  !--- lookup hail out record ---
  cfif Trim(ARGUMENTS.hailType) eq OUT
cfset qGetHail = 
CreateObject(component,appcfcs.fos.hails).getHailOuty(ARGUMENTS.user,ARGUMENTS.pwd,activityID)
  !--- lookup hail in record ---
  cfelseif Trim(ARGUMENTS.hailType) eq IN
cfset qGetHail = 
CreateObject(component,appcfcs.fos.hails).getHailIn(ARGUMENTS.user,ARGUMENTS.pwd,activityID)
  /cfif

  cfreturn qGetHail

  cfcatch type=any
   !---  cfset qGetHail = packageError(cfcatch.errorMessage) ---
cfdump var=#cfcatch#cfabort
  /cfcatch

/cftry

  /cffunction

I have forced an error by calling getHailOuty instead of getHailOut 
(this condition is met cfif Trim(ARGUMENTS.hailType) eq OUT).  The 
cfcatch does NOT fire off and no dump of cfcatch scope occursinstead I 
get a standard fairly useless CF webservice error.

Anybody?

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 




~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220851
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
exactly what I'm doing Kenand I think I have it all working now (didn't 
have cfreturn as part of my catchtry when the remote machine connection is 
restored)DOH!

I'm having one of thse days today ;-)

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220852
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


SOLVED: Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
Let's just say it works as intended and leave it at that ;-)

Thanks to all that replied

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220858
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: [Norton AntiSpam] SOLVED: Re: CFCs and cftry/cfcatch

2005-10-12 Thread Andrew Scott
Bryan,

Just a FYI. Even if you have a site wide error handling, or even a cferror
tag, a cftry/cfcacth will override those. As you really never explained the
error, and there was the possibility that you didn't have output='true' then
I can also assume that you haven't patched your server with the cfdump in a
cftry block bug.


Regards,
Andrew Scott
 
Quote of the Day:
Me and my two friends... GIF and Wesson.
-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 13 October 2005 6:32 AM
To: CF-Talk
Subject: [Norton AntiSpam] SOLVED: Re: CFCs and cftry/cfcatch

Let's just say it works as intended and leave it at that ;-)

Thanks to all that replied

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220862
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: [Norton AntiSpam] SOLVED: Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
 Just a FYI. Even if you have a site wide error handling, or even a cferror
 tag, a cftry/cfcacth will override those.

Yep...that's why I couldn't figure out what was up...but I did know what 
should take precedence

 As you really never explained the
 error, and there was the possibility that you didn't have output='true' 
 then
 I can also assume that you haven't patched your server with the cfdump in 
 a
 cftry block bug.

Not sure about the patch (on MX 7)but I know I've seen cfdump work 
inside a cftry.  The biggie I never mentioned is that this is a 
webservice...so I would assume output of true wouldn't work anyways??

All is workinig now though...essentially by not having a cfreturn as part of 
the cfcatch, I was causing an error of the wrong datatype being returned 
(i.e. nothing being returned when it should have been a query).

I've seen lots of complaints about debugging webservices in CFI'm 
starting to understand why ;-)

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220864
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: [Norton AntiSpam] SOLVED: Re: CFCs and cftry/cfcatch

2005-10-12 Thread Andrew Scott
Bryan,

If you don't have a return, it should have fallen through to the nearest
return. I take it that in the cfcatch you also had a cfabort then? Which
would explain why you need the return.


Regards,
Andrew Scott
 
Quote of the Day:
IBM: Increasingly Banal Movement
-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 13 October 2005 8:01 AM
To: CF-Talk
Subject: Re: [Norton AntiSpam] SOLVED: Re: CFCs and cftry/cfcatch

 Just a FYI. Even if you have a site wide error handling, or even a cferror
 tag, a cftry/cfcacth will override those.

Yep...that's why I couldn't figure out what was up...but I did know what 
should take precedence

 As you really never explained the
 error, and there was the possibility that you didn't have output='true' 
 then
 I can also assume that you haven't patched your server with the cfdump in 
 a
 cftry block bug.

Not sure about the patch (on MX 7)but I know I've seen cfdump work 
inside a cftry.  The biggie I never mentioned is that this is a 
webservice...so I would assume output of true wouldn't work anyways??

All is workinig now though...essentially by not having a cfreturn as part of

the cfcatch, I was causing an error of the wrong datatype being returned 
(i.e. nothing being returned when it should have been a query).

I've seen lots of complaints about debugging webservices in CFI'm 
starting to understand why ;-)

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220865
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: [Norton AntiSpam] SOLVED: Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
nope...the proper return bailed (intentionally so I could test the 
try/catch) casuing the cfcatch to fire off...it had no return so I still 
ended up with a method returning something not of type query

just my own stupidity...it happens...sh ;-)

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220866
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: [Norton AntiSpam] Re: [Norton AntiSpam] SOLVED: Re: CFCs and cftry/cfcatch

2005-10-12 Thread Andrew Scott
Bryan,

That’s because after looking at the code, you had the return prior to the
cactch.

This is what I always do.

cffunction
cftry
    Logic
 /cftry
 cfcatch
    Catch Error
/cfcatch
 cfreturn retValue /
/cffunction

Now as this was a query you could defined the retValue as an empty query,
then if the cacth is being caught it would fall through and return an empty
query. Otherwise the query will be returned populated.


Regards,
Andrew Scott
 
Quote of the Day:
Your manuscript is both good and original, but the part that is good is 
not original and the part that is original is not good.
-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 13 October 2005 8:14 AM
To: CF-Talk
Subject: [Norton AntiSpam] Re: [Norton AntiSpam] SOLVED: Re: CFCs and
cftry/cfcatch

nope...the proper return bailed (intentionally so I could test the 
try/catch) casuing the cfcatch to fire off...it had no return so I still 
ended up with a method returning something not of type query

just my own stupidity...it happens...sh ;-)

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 




~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220867
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: [Norton AntiSpam] Re: [Norton AntiSpam] SOLVED: Re: CFCs and cftry/cfcatch

2005-10-12 Thread Bryan Stevenson
yep...what I'm doing is essentially the same thing.6 of one half dozen 
of another ;-)

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com 


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220868
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


CFTRY and CFCATCH

2005-10-10 Thread Mickael
Hi All,

I have never really had a good handle on CFTRY and CFCATCH.  If I have 
an error on my website as follows


  The request has exceeded the allowable time limit Tag: CFQUERY


What type of cfcatch is that?  Or can that not be caught by CFCatch?

Mike




~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220525
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFTRY and CFCATCH

2005-10-10 Thread Dawson, Michael
Try CFDUMP on the CFCATCH structure.  That should show you the type of
the exception.

cftry
  cfquery
  ...SQL...
  /cfquery

  cfcatch type=any
cfdump var=#cfcatch#
  /cfcatch
/cftry

I would say, in this case, it is probably a database exception.

M!ke

-Original Message-
From: Mickael [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 10, 2005 7:21 AM
To: CF-Talk
Subject: CFTRY and CFCATCH

Hi All,

I have never really had a good handle on CFTRY and CFCATCH.  If I have
an error on my website as follows


  The request has exceeded the allowable time limit Tag: CFQUERY


What type of cfcatch is that?  Or can that not be caught by CFCatch?

Mike

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220537
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


cfcatch/cfdump weirdness

2005-09-08 Thread Timothy Heald
Afternoon folks!

We have run into some really strange problems with cfdump-ing a cfcatch 
structure.  It is almost as though at the end of cfdump var=#cfcatch# is 
cfsetiing enablecfoutputonly=yes.

We are running this and getting the same results on 2 different servers.  Both 
are on CFMX 6.1, one is windows 2000, one is 2003.  Here are three test cases:

Test1.cfm
!--- 

start test1.cfm

This will not render anything below the cfdump outside of a cf tag or cfoutput 
block
---

div
Stuff in the div top
/div


cftry
cfthrow type=application message=stuff happens
cfcatch type=application
cfdump var=#cfcatch#
cfdump var=#server#
/cfcatch
/cftry

div
Stuff in the div bottom
/div

!--- end test1.cfm ---

test2.cfm
!---
start test2.cfm

This test has cfsetting enablecfoutputonly set to no.  It will allow content to 
be rendered
---


div
Stuff in the div top
/div


cftry
cfthrow type=application message=stuff happens
cfcatch type=application
cfdump var=#cfcatch#
cfsetting enablecfoutputonly=no
cfdump var=#server#
/cfcatch
/cftry

div
Stuff in the div bottom
/div

!--- end test2.cfm ---

test3.cfm
!---
test3.cfm

This one has the dump of the cfcatch structure removed.  You can see the 
content at the bottom of the page is rendered
---


div
Stuff in the div top
/div


cftry
cfthrow type=application message=stuff happens
cfcatch type=application
!--- 
cfdump var=#cfcatch#
cfsetting enablecfoutputonly=no
---
cfdump var=#server#
/cfcatch
/cftry

div
Stuff in the div bottom
/div

!--- end test3.cfm ---

Tim

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217681
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: cfcatch/cfdump weirdness

2005-09-08 Thread Barney Boisvert
I see the bottom content for all three cases.  CFMX 6.1 on JRun on
RedHat 8.0.  You got an Application.cfm somewhere that's screwing
things up?

cheers,
barneyb

On 9/8/05, Timothy Heald [EMAIL PROTECTED] wrote:
 Afternoon folks!
 
 We have run into some really strange problems with cfdump-ing a cfcatch 
 structure.  It is almost as though at the end of cfdump var=#cfcatch# is 
 cfsetiing enablecfoutputonly=yes.
 
 We are running this and getting the same results on 2 different servers.  
 Both are on CFMX 6.1, one is windows 2000, one is 2003.  Here are three test 
 cases:
 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217684
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: cfcatch/cfdump weirdness

2005-09-08 Thread Loathe
Nope.

Commented out the logic in the app.cfm for just that reason and just left in
cfset temp =  so it wouldn't blow up.

-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 08, 2005 4:49 PM
To: CF-Talk
Subject: Re: cfcatch/cfdump weirdness


I see the bottom content for all three cases.  CFMX 6.1 on JRun on
RedHat 8.0.  You got an Application.cfm somewhere that's screwing
things up?

cheers,
barneyb

On 9/8/05, Timothy Heald [EMAIL PROTECTED] wrote:
 Afternoon folks!

 We have run into some really strange problems with cfdump-ing a cfcatch
structure.  It is almost as though at the end of cfdump var=#cfcatch# is
cfsetiing enablecfoutputonly=yes.

 We are running this and getting the same results on 2 different servers.
Both are on CFMX 6.1, one is windows 2000, one is 2003.  Here are three test
cases:


--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:217715
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Dump CFCATCH

2005-06-28 Thread Trevor Orr
When I try to do CFDUMP VAR=#CFCATCH#
 
I get the following [Unknown Type] when I used to get the entire CFCatch
structure dumped, anyone have any ideas why I am now getting this. 
 
 
 
Trevor Orr
Summit Projects
[EMAIL PROTECTED]
541.387.8883 x213
 
 


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210787
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Dump CFCATCH

2005-06-28 Thread Rob Barthle
We recently heard from some people in our OPS department that mentioned this 
was happening as well.

Personally, I've been using the following template for CFCATCH dumps. Have not 
had a problem so far with it.

cfswitch expression=#cfcatch.Type#
cfcase value=application
cfset dumplist=type,message,detail,tagcontext,ExtendedInfo
/cfcase
cfcase value=database
cfset 
dumplist=type,message,detail,tagcontext,NativeErrorCode,SQLState,Sql,queryError,where
/cfcase
cfcase value=expression
cfset dumplist=type,message,detail,tagcontext,ErrNumber
/cfcase
cfcase value=lock
cfset 
dumplist=type,message,detail,tagcontext,LockName,LockOperation
/cfcase
cfcase value=missingInclude
cfset 
dumplist=type,message,detail,tagcontext,MissingFileName
/cfcase
cfcase value=object,security,template
cfset dumplist=type,message,detail,tagcontext
/cfcase
cfdefaultcase
cfset dumplist=type,message,detail,tagcontext
/cfdefaultcase
/cfswitch

p
ubCFCATCH Error Variables/b/ubr
cfloop list=#dumplist# index=i
ucfcatch.#i#/ubr
cfdump var=#evaluate(cfcatch.  i)#brbr
/cfloop
/p


When I try to do CFDUMP VAR=#CFCATCH#
 
I get the following [Unknown Type] when I used to get the entire CFCatch
structure dumped, anyone have any ideas why I am now getting this. 
 
 
 
Trevor Orr
Summit Projects
[EMAIL PROTECTED]
541.387.8883 x213

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210788
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dump CFCATCH

2005-06-28 Thread Aaron Rouse
What version of CF are you using? I have some code that pretty certain did 
this on CF5 and worked fine but now on our 6.1 server it does the same 
thing, does not on our 7 server. Was told it is a known bug but I did not 
look to verify that word of mouth information.

On 6/28/05, Trevor Orr [EMAIL PROTECTED] wrote: 
 
 When I try to do CFDUMP VAR=#CFCATCH#
 
 I get the following [Unknown Type] when I used to get the entire CFCatch
 structure dumped, anyone have any ideas why I am now getting this.
 
 
 
 Trevor Orr
 Summit Projects
 [EMAIL PROTECTED]
 541.387.8883 x213
 
 
 
 
 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210790
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dump CFCATCH

2005-06-28 Thread Charlie Griefer
yeah, for some reason on 6.1 (i believe after the updater), you can no
longer dump the cfcatch scope.  you do still have all of the values
(cfcatch.error, cfcatch.message, etc) available tho.  just don't have
the convenience of dumping 'em all out in one swell foop.


On 6/28/05, Aaron Rouse [EMAIL PROTECTED] wrote:
 What version of CF are you using? I have some code that pretty certain did
 this on CF5 and worked fine but now on our 6.1 server it does the same
 thing, does not on our 7 server. Was told it is a known bug but I did not
 look to verify that word of mouth information.
 
 On 6/28/05, Trevor Orr [EMAIL PROTECTED] wrote:
 
  When I try to do CFDUMP VAR=#CFCATCH#
 
  I get the following [Unknown Type] when I used to get the entire CFCatch
  structure dumped, anyone have any ideas why I am now getting this.
 
 
 
  Trevor Orr
  Summit Projects
  [EMAIL PROTECTED]
  541.387.8883 x213
 
 
 
 
 
 
 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210792
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dump CFCATCH

2005-06-28 Thread Nathan Strutz
There is a hotfix out to patch 6.1+updater for cfcatch to display what 
it's supposed to in a cfdump.

-nathan strutz


Charlie Griefer wrote:
 yeah, for some reason on 6.1 (i believe after the updater), you can no
 longer dump the cfcatch scope.  you do still have all of the values
 (cfcatch.error, cfcatch.message, etc) available tho.  just don't have
 the convenience of dumping 'em all out in one swell foop.
 
 
 On 6/28/05, Aaron Rouse [EMAIL PROTECTED] wrote:
 
What version of CF are you using? I have some code that pretty certain did
this on CF5 and worked fine but now on our 6.1 server it does the same
thing, does not on our 7 server. Was told it is a known bug but I did not
look to verify that word of mouth information.

On 6/28/05, Trevor Orr [EMAIL PROTECTED] wrote:

When I try to do CFDUMP VAR=#CFCATCH#

I get the following [Unknown Type] when I used to get the entire CFCatch
structure dumped, anyone have any ideas why I am now getting this.



Trevor Orr
Summit Projects
[EMAIL PROTECTED]
541.387.8883 x213







 
 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210794
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dump CFCATCH

2005-06-28 Thread Aaron Rouse
Yeah, I just saw that, but also noticed ours says [empty string] and the 
hotfix is to fix [unknown type] wonder if it fixes both.

On 6/28/05, Nathan Strutz [EMAIL PROTECTED] wrote: 
 
 There is a hotfix out to patch 6.1+updater for cfcatch to display what
 it's supposed to in a cfdump.
 
 -nathan strutz
 
 
 Charlie Griefer wrote:
  yeah, for some reason on 6.1 (i believe after the updater), you can no
  longer dump the cfcatch scope. you do still have all of the values
  (cfcatch.error, cfcatch.message, etc) available tho. just don't have
  the convenience of dumping 'em all out in one swell foop.
 
 
  On 6/28/05, Aaron Rouse [EMAIL PROTECTED] wrote:
 
 What version of CF are you using? I have some code that pretty certain 
 did
 this on CF5 and worked fine but now on our 6.1 server it does the same
 thing, does not on our 7 server. Was told it is a known bug but I did 
 not
 look to verify that word of mouth information.
 
 On 6/28/05, Trevor Orr [EMAIL PROTECTED] wrote:
 
 When I try to do CFDUMP VAR=#CFCATCH#
 
 I get the following [Unknown Type] when I used to get the entire 
 CFCatch
 structure dumped, anyone have any ideas why I am now getting this.
 
 
 
 Trevor Orr
 Summit Projects
 [EMAIL PROTECTED]
 541.387.8883 x213
 
 
 
 
 
 
 
 
 
 
 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210797
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Dump CFCATCH

2005-06-28 Thread Trevor Orr
We are running 6.1, will try the hotfix on our dev servers and see what
happens.

 

-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 28, 2005 11:17 AM
To: CF-Talk
Subject: Re: Dump CFCATCH

What version of CF are you using? I have some code that pretty certain
did this on CF5 and worked fine but now on our 6.1 server it does the
same thing, does not on our 7 server. Was told it is a known bug but I
did not look to verify that word of mouth information.

On 6/28/05, Trevor Orr [EMAIL PROTECTED] wrote: 
 
 When I try to do CFDUMP VAR=#CFCATCH#
 
 I get the following [Unknown Type] when I used to get the entire 
 CFCatch structure dumped, anyone have any ideas why I am now getting
this.
 
 
 
 Trevor Orr
 Summit Projects
 [EMAIL PROTECTED]
 541.387.8883 x213
 
 
 
 
 



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210801
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dump CFCATCH

2005-06-28 Thread Chris Norloff
The HotFix fixes the [unknown type] error if you've applied the Updater to v6.1.

[empty string] sounds like there's nothing in the cfcatch scope - it's a 
transient scope that exists only right after a cfcatch is called

Chris Norloff


-- Original Message --
From: Aaron Rouse [EMAIL PROTECTED]
Reply-To: cf-talk@houseoffusion.com
Date:  Tue, 28 Jun 2005 14:01:01 -0500

Yeah, I just saw that, but also noticed ours says [empty string] and the 
hotfix is to fix [unknown type] wonder if it fixes both.

On 6/28/05, Nathan Strutz [EMAIL PROTECTED] wrote: 
 
 There is a hotfix out to patch 6.1+updater for cfcatch to display what
 it's supposed to in a cfdump.
 
 -nathan strutz
 
 
 Charlie Griefer wrote:
  yeah, for some reason on 6.1 (i believe after the updater), you can no
  longer dump the cfcatch scope. you do still have all of the values
  (cfcatch.error, cfcatch.message, etc) available tho. just don't have
  the convenience of dumping 'em all out in one swell foop.
 
 
  On 6/28/05, Aaron Rouse [EMAIL PROTECTED] wrote:
 
 What version of CF are you using? I have some code that pretty certain 
 did
 this on CF5 and worked fine but now on our 6.1 server it does the same
 thing, does not on our 7 server. Was told it is a known bug but I did 
 not
 look to verify that word of mouth information.
 
 On 6/28/05, Trevor Orr [EMAIL PROTECTED] wrote:
 
 When I try to do CFDUMP VAR=#CFCATCH#
 
 I get the following [Unknown Type] when I used to get the entire 
 CFCatch
 structure dumped, anyone have any ideas why I am now getting this.
 
 
 
 Trevor Orr
 Summit Projects
 [EMAIL PROTECTED]
 541.387.8883 x213
 
 
 
 
 
 
 
 
 
 
 



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210808
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dump CFCATCH

2005-06-28 Thread Chris Norloff
ColdFusion MX 6.1 Updater: Hot fix for cfdump throwing unknown type error for 
cfcatch structure
http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=1a9c83c

-- Original Message --
From: Trevor Orr [EMAIL PROTECTED]
Reply-To: cf-talk@houseoffusion.com
Date:  Tue, 28 Jun 2005 10:56:19 -0700

When I try to do CFDUMP VAR=#CFCATCH#
 
I get the following [Unknown Type] when I used to get the entire CFCatch
structure dumped, anyone have any ideas why I am now getting this. 
 
 
 
Trevor Orr
Summit Projects
[EMAIL PROTECTED]
541.387.8883 x213
 
 




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210807
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Dump CFCATCH

2005-06-28 Thread Aaron Rouse
thanks, now to just see if I can get them to apply it

On 6/28/05, Chris Norloff [EMAIL PROTECTED] wrote: 
 
 ColdFusion MX 6.1 Updater: Hot fix for cfdump throwing unknown type error 
 for cfcatch structure
 http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=1a9c83c
 
 -- Original Message --
 From: Trevor Orr [EMAIL PROTECTED]
 Reply-To: cf-talk@houseoffusion.com
 Date: Tue, 28 Jun 2005 10:56:19 -0700
 
 When I try to do CFDUMP VAR=#CFCATCH#
 
 I get the following [Unknown Type] when I used to get the entire CFCatch
 structure dumped, anyone have any ideas why I am now getting this.
 
 
 
 Trevor Orr
 Summit Projects
 [EMAIL PROTECTED]
 541.387.8883 x213
 
 
 
 
 
 
 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210812
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


dumping cfcatch - UndefinedElementException

2005-06-28 Thread Russ
We have a global error handler that writes the errors to a log file.  For
some of the entries everything is good, and it dumps all the variables
properly (the full stack trace, including the line numbers of where the
error occurred.).  However for some of the elements all I'm getting is the
error below. I'm just dumping #cfcatch#.  Why is it different in this case
and how do I get the template and line numbers?

 

Russ

 


object of coldfusion.runtime.UndefinedElementException


Methods

getMessage (returns java.lang.String)
getResolvedname (returns java.lang.String)
getErrNumber (returns int)
getLocalizedMessage (returns java.lang.String)
getType (returns java.lang.String)
getString (returns java.lang.String)
getRootCause (returns java.lang.Throwable)
setLocale (returns void)
findThrowableTarget (returns int)
findAdvancedCFTarget (returns int)
findCustomTarget (returns int)
unwrap (returns java.lang.Throwable)
getDetail (returns java.lang.String)
printStackTrace (returns void)
printStackTrace (returns void)
printStackTrace (returns void)
fillInStackTrace (returns java.lang.Throwable)
toString (returns java.lang.String)
initCause (returns java.lang.Throwable)
getCause (returns java.lang.Throwable)
getStackTrace (returns [Ljava.lang.StackTraceElement;)
setStackTrace (returns void)
hashCode (returns int)
getClass (returns java.lang.Class)
wait (returns void)
wait (returns void)
wait (returns void)
equals (returns boolean)
notify (returns void)
notifyAll (returns void)


objectType

class java.lang.Class 


container

class java.lang.Object 


element

NAME 


 

 

 



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210822
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: dumping cfcatch - UndefinedElementException

2005-06-28 Thread S . Isaac Dealey
 We have a global error handler that writes the errors
 to a log file.  For some of the entries everything is
 good, and it dumps all the variables properly (the
 full stack trace, including the line numbers of where
 the error occurred.).  However for some of the
 elements all I'm getting is the error below. I'm just
 dumping #cfcatch#.  Why is it different in this case
 and how do I get the template and line numbers?

Even with CF7, cfcatch objects still frequently don't function as
expected... The best answer I've been able to come up with is this:

function getError(err) {
var err2 = structnew();
structappend(err2,err,true);
if (structkeyexists(err,rootCause)) {
err2.rootCause = getError(err.rootCause);
} return err2;
}

And then dump or otherwise use the result of getError() as you
normally would the cfcatch object... I had a problem recently with
cfcatch where cfinvoke x=y argumentcollection=#cfcatch# produced
the error the required argument x was not provided but changing it
to argumentcollection=#getError(cfcatch)# produced the expected
behavior.

No guarantees this will resolve your issue, but I figured it might be
germane (or maybe Janet). :)

s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210828
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFTRY/CFCATCH exposing CF errors?

2005-04-08 Thread Micha Schopman
Matt, 

We also had this type of issue a while ago, were cftry/cfcatch didn't
suppress the error. We tried everything but with no results on the cf
side. We did a workaround in the presentation layer (the logic consisted
in outputting raw xml strings). It was definitely a bug, but we couldn't
reproduce it in other scenarios. 

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201968
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?

2005-04-08 Thread Sean Corfield
On Apr 7, 2005 5:42 PM, Matt Robertson [EMAIL PROTECTED] wrote:
 OK its very simple code.  I'll send it over.  Mostly what I posted
 already.  But it doesn't happen on my live server.  Only my dev box
 here on my desktop, where I could put in a simple s/w error handler on
 a relatively clean system.  The live box is probably better patched
 than this desktop.

Here's the result of my tests:

CF7 - works just fine.
CF6.1 Updater 1 (6,1,0,83762) - works just fine.
CF6 unpatched (6,1,0,63958) - random behavior including hangs,
apparent right behavior (followed by a crash) etc.

So it looks like a bug that got fixed - and is not longer present in
CFMX 6.1 Updater 1 (nor CFMX 7).
-- 
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give away!

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201995
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: SOLVED: Re: CFTRY/CFCATCH exposing CF errors?

2005-04-08 Thread Matt Robertson
Thanks again for taking the time to look this over, Sean!

-- 
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202028
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


CFTRY/CFCATCH exposing CF errors?

2005-04-07 Thread Bryan Stevenson
Hey All,

PROBLEM:
An Oracle connection refused error was displayed in a production system (yes 
all the lovely SQL exposed to the public..bad, bad, bad), when the code that 
attempted the connection was wrapped in a CFTRY/CFCATCH...that runs an error 
handling tag on error.  The tag is supposed to display a user-friendly message 
and e-mail the error to the developers (and works 99.9% of the time).

So...how can a standard CF error be displayed when a CFTRY/CFCATCH is setup 
specifically to NOT show actual CF error messages?

TIA

Cheers

Bryan Stevenson B.Comm.
VP  Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201912
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: CFTRY/CFCATCH exposing CF errors?

2005-04-07 Thread Michael T. Tangorre
 From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
 So...how can a standard CF error be displayed when a 
 CFTRY/CFCATCH is setup specifically to NOT show actual CF 
 error messages?

What kind of exception are you catching with the cfcatch tag? Any? Database?
Check that first...

Mike




~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201917
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFTRY/CFCATCH exposing CF errors?

2005-04-07 Thread Matt Robertson
When it blows inside of /Application.cfm, which isn't subject to
try/catch.  I try to but up a backup cferror statement inside of that
file as high up as possible for just that reason.

On Apr 7, 2005 10:18 AM, Bryan Stevenson [EMAIL PROTECTED] wrote:
 Hey All,
 
 PROBLEM:
 An Oracle connection refused error was displayed in a production system 
 (yes all the lovely SQL exposed to the public..bad, bad, bad), when the code 
 that attempted the connection was wrapped in a CFTRY/CFCATCH...that runs an 
 error handling tag on error.  The tag is supposed to display a user-friendly 
 message and e-mail the error to the developers (and works 99.9% of the time).
 
 So...how can a standard CF error be displayed when a CFTRY/CFCATCH is setup 
 specifically to NOT show actual CF error messages?
 
 TIA
 
 Cheers
 
 Bryan Stevenson B.Comm.
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 phone: 250.480.0642
 fax: 250.480.1264
 cell: 250.920.8830
 e-mail: [EMAIL PROTECTED]
 web: www.electricedgesystems.com
 
 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201918
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFTRY/CFCATCH exposing CF errors?

2005-04-07 Thread Matt Robertson
Another thing: I *think* a site-wide error handler in place would act
as a backup as well.  And this could happen inside of OnRequestEnd.cfm
too.
-- 
--mattRobertson--
Janitor, MSB Web Systems
mysecretbase.com

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201919
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


  1   2   3   4   >