-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 10:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
You _have_ to use cfthrow within test to throw within test.
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL
Adam, you can still do a try/catch inside the throw function. By using
writeoutput(excp.message);
-Original Message-
From: Adam Wayne Lehman [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 9:05 AM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Right. This is one
On Wednesday 17 Sep 2003 14:04 pm, Adam Wayne Lehman wrote:
Why oh why do we have try/catch but no throw? It's like we got loops
without a break command.
No point.
You can just an an extra looping condition, and change the value of that flag
if you need to break out.
--
Tom Chiverton (sorry
-
From: Thomas Chiverton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 11:03 AM
To: CF-Talk
Subject: Re: Can I Throw within cfscript???
On Wednesday 17 Sep 2003 14:04 pm, Adam Wayne Lehman wrote:
Why oh why do we have try/catch but no throw? It's like we got loops
without a break
Health
Distance Education Division
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 10:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
You _have_ to use cfthrow within test to throw within test.
-Original Message
On Wednesday, Sep 17, 2003, at 08:20 US/Pacific, Adam Wayne Lehman
wrote:
Thanks Tom. There is actually a 'break' command in cfscript, I was just
using it as an example to illustrate operators and commands that go
hand
in hand.
There are a lot of folks who think that using 'break' in a loop
Do I have to go out of the script language to throw and error or is there a
way to do it within cf-script(without separate function call that throws
error)?
Andy
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
You can write a wrapper function for CFTHROW then call that function from
within your CFScript block...
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 2:43 PM
To: CF-Talk
Subject: Can I Throw within cfscript???
Do I have to go out
You can write a wrapper function for CFTHROW then call that function from
within your CFScript block...
yes, but you have to manage most of the error details yourself. cfscript
really needs a throw().
~|
Archives:
no need for wrapper...throw();
http://www.mail-archive.com/[EMAIL PROTECTED]/msg145231.html for an example
doug
-Original Message-
From: Shawn Grover [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 4:48 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
You can
This won't work on my system running under NT MX.
Andy
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 3:53 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
no need for wrapper...throw();
http://www.mail-archive.com
within cfscript???
This won't work on my system running under NT MX.
Andy
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 3:53 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
no need for wrapper...throw
: Can I Throw within cfscript???
This won't work on my system running under NT MX.
Andy
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 3:53 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
no need for wrapper
]
Sent: Tuesday, September 16, 2003 4:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Raymond,
CFFunction works, what doesn't is:
cfscript
throw(type=ValidationError Message=This just wont work);
...
Andy
-Original Message-
From: Raymond Camden
Subject: RE: Can I Throw within cfscript???
foo(x=y z=a) is not valid in cfml. The example in the link below does
not do that. You should instead do:
foo(y,a)
or
foo(x=y,z=a)
===
Raymond Camden, ColdFusion Jedi Master
Andy you still have to init your library.
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:29 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Create a complete page with only the following:
cfscript
throw(message
Huh?
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Andy you still have to init your library.
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED
: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:46 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Huh?
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:45 PM
To: CF-Talk
Subject: RE: Can I Throw
perfectly.
Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:01 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
You have to create a reference to the cfc before you can call a function
from the cfc in your cfml.
Example
, 2003 7:58 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
OK, now I am totally confused. Please walk me through this...
I have a CFC called FOO with a single method called Throw Exception:
FOO:
Function ThrowException
throw(message=Test one);
what object am I instantiating
throwExceptionReturn
/cffunction
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:12 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
First do you have a cfc file that has your function throw() in it? And
now your trying to call
Correct. Before, I was trying to simplify the problem to what I thought was
the root.
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:12 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
First do you have a cfc file
PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Correct. Before, I was trying to simplify the problem to what I thought
was
the root.
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:12 PM
To: CF-Talk
Subject: RE: Can I
, September 16, 2003 8:45 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Correct. Before, I was trying to simplify the problem to what I thought
was
the root.
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 7:12 PM
To: CF-Talk
Ok, I need some more information. Please post an example of your cfc and
your cfml page
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:00 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Not what I am looking to do. I
Andy
-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:18 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Ok, I need some more information. Please post an example of your cfc and
your cfml page
-Original Message-
From
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Bryan,
Here is sample code. First, observe that the two catch blocks behave
differently. Second, can you replace
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Bryan,
Here is sample code. First, observe that the two catch blocks behave
differently. Second, can you replace the throw in Test with a script
statement without changing
-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 8:49 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
You can't.
You have to define a throw() function elsewhere that wraps the CFTHROW tag,
and include the definition before it's
PM
To: CF-Talk
Subject: Try And Catch work differently then CFTRYCFCATCH (was RE:
Can I Throw within cfscript???)
Barney,
Interestingly, as I noted in my previous email, TRY's and Catchs under
script operate differently. So this is also a problem. For example,
cut
and past the following and run
: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 9:34 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Bryan,
Here is sample code. First, observe that the two catch blocks behave
differently. Second, can you replace the throw in Test with a script
statement
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Bryan,
This is not the same code. All you are doing is returning from a
function
call. You are NOT throwing an exception
You _have_ to use cfthrow within test to throw within test.
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript???
Bryan,
This is not the same code. All you are doing
You can not throw a custom throw within the custom throw, you will have
to use cfthrow within your custom throw function
-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 10:03 PM
To: CF-Talk
Subject: RE: Can I Throw within cfscript
9:54 PM
To: CF-Talk
Subject: Try And Catch work differently then CFTRYCFCATCH (was RE:
Can I Throw within cfscript???)
Barney,
Interestingly, as I noted in my previous email, TRY's and Catchs under
script operate differently. So this is also a problem. For example,
cut
and past the following
35 matches
Mail list logo