> Is there a way to trap for connection errors, Like
> bad passwords and the like? I've tried < CFCATCH TYPE="Any">

I use CFPOP all the time (I guess I'm a sucker for punishment), and
CFCATCH always worked for me with bad logins.  Below is the code I have.
I'm still in the dark, though, about why CFCATCH doesn't catch the
"Unknown exception condition" error I'm getting all the time with CFPOP.
But no one wants to hear any more about that, I know.

        -- Owen

--------------

<cfcatch type="ANY">
    <cfinclude template="_base_header.cfm">
        <table border="0" cellpadding="1" bgcolor="#000000" cellspacing="0"
align="center" width="65%"><tr><td>
        <table border="0" cellpadding="5" bgcolor="#FFFFCC" align="center">
        <tr><td>
<h3>Oops...!</h3>
<p><big>
        <cfif cfcatch.Message contains "Bad login">
        The username and/or password you supplied was invalid!</big><br><br>
        The username and/or the password you typed was incorrect.  Please make
sure you typed them correctly, and make sure 'caps lock' isn't on.
        <cfelseif cfcatch.Message contains "timeout">
        The email program has given up waiting for
<cflock timeout="10" throwontimeout="No" type="READONLY"
scope="SESSION">                <cfoutput>
                        #Session.POPserver#
                </cfoutput></cflock>
                to respond.</big><br><br>
                The email server hasn't responded.  It could mean the server isn't
working, or it could be unusually busy at the moment.  Please try again
in a few minutes.
        <cfelseif cfcatch.Message contains "Connection Failure">
                The email program was unable to contact the server, possibly due to a
problem with your internet connection.
        <cfelse>
The email program has encountered the following error:</big></p>
<p>
<tt>
                                        <cfoutput>
                                                
#CFCatch.Message#<br><br>#CFCatch.Detail#
                                        </cfoutput>
</tt>
</big></p>
        </cfif>
<p align="center"><form action="index.cfm"><input type="submit"
class="button" value="&lt;&lt; Try Again"> &nbsp; &nbsp; &nbsp; <input
type="button" class="button" value="Work Offline &gt;&gt;"
onClick="location.href='refresh_offline.cfm'; return false;"></form></p>
</td></tr>
</table></td></tr></table>
    <cfinclude template="_footer.cfm">
    <cfabort>
</cfcatch>

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to