Having small problem ith cferror

Hey people. I have the following cferror code for my custom error messages, but it won't work for missng templates. Not sure why have search high and low on the adobe forums and came out empty. Any help would be great.
=== Application.cfc ===
<cfcomponent>
    <cferror type="Request" template="errormessage.cfm"
           mailto="[email protected]">
    <cferror type="Exception" template="errormessage.cfm"
           mailto="[email protected]">
    <cferror type="Validation" template="errormessage.cfm"
           mailto="[email protected]">
  <cffunction name="onRequestStart">
    <cflogin>
      <cfif IsDefined("FORM.Login_btn")>
        <cfquery name="qLogin" datasource="poll">
        SELECT UserLogin, UserPassword, UserRoleID
        FROM Users
        WHERE UserLogin = <cfqueryparam value="#cflogin.Name#" cfsqltype="cf_sql_varchar">
        AND UserPassword = <cfqueryparam value="#cflogin.Password#" cfsqltype="cf_sql_varchar">
        </cfquery>
        <cfif cflogin.name IS "#qLogin.UserLogin#" AND cflogin.password IS "#qLogin.UserPassword#">
          <cfloginuser name="#cflogin.name#"
                       password="#cflogin.password#"
                       roles="#qLogin.UserRoleID#">
        <cfelse>
        <cfset request.errorMsg = "Incorrect login; please try again">
          <cfinclude template="../login/login.cfm">
            <cfabort />   
        </cfif>
      <cfelse>
        <cfinclude template="../login/login.cfm">
          <cfabort />
      </cfif>
    </cflogin>
  </cffunction>
</cfcomponent>
=== errormessage.cfm ===
<!---
Filename: ErrorException.cfm
Created by: Nate Weiss (NMW)
Please Note: Included via <CFERROR> in Application.cfc
--->
<html>
<head><title>Error</title></head>
<body>
<!--- Display sarcastic message to poor user --->
<h2>OOPS Something happened</h2><br><br>
Not sure what went wrong, but the admin has been notified about this problem and we will have if fixed soon. <br>
Sorry for the inconvenience.
<!--- Send an email message to site administrator --->
<!--- (or whatever address provided to <cferror>) --->
<cfif ERROR.mailTo neq "">
<cfmail to="#ERROR.mailTo#" from="[email protected]"
subject="Error on Page #ERROR.Template#">
Error Date/Time: #ERROR.dateTime#
User’s Browser: #ERROR.browser#
URL Parameters: #ERROR.queryString#
Previous Page: #ERROR.HTTPReferer#
#ERROR.diagnostics#
</cfmail>
</cfif>
</body>
</html>
Thanks in advanced

When you say missing templates, do you mean ones that are referred to on a URL, or when using CFINCLUDE (or both)?
If it's from the URL, then odds-on the web server is checking whether the file exists before passing processing to CF, and if it doesn't exist, it uses its own 404 handler.
Adam
PS: I'd probably use onError() and onMissingTemplate() if I was using Application.cfc.  To me CFERROR is a bit of an old artefact of the pre-event-driven days of Application.cfm.  Either will work, but the event-handler approach is more inkeeping with the intents of Application.cfc.

Similar Messages

  • I am having a problem with pop pups and small windows with ads constantly opening up on my safari?? Thought that macs didn't get virus? this looks like one- any experts around? please help me fix it with your instructions? really don't know what to do...

    Hi everyone,
    I am having a problem with my Mac OS X 10.7.5 mac book air , there are constant pop pups and small windows with ads blinking constantly opening up on my safari in front of everything?? it is constantly interupting me and makes me mistakingly click on it then another new windows open behind the one im using..
    I am not too sure if thats a virus or trojan.. I always thought that macs didn't get virus? this looks like one to me… any experts around? please help me fix it with your instructions? really don't know what to do... thanks

    Those are not viruses. You have probably installed some malware:
    The Safe Mac » Adware Removal Guide
    Helpful Links Regarding Malware Protection
    An excellent link to read is Tom Reed's Mac Malware Guide.
    Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
    See these Apple articles:
              Mac OS X Snow Leopard and malware detection
              OS X Lion- Protect your Mac from malware
              OS X Mountain Lion- Protect your Mac from malware
              About file quarantine in OS X
    If you require anti-virus protection Thomas Reed recommends using Dr.Web Light from the App Store. It's free, and since it's from the App Store, it won't destabilize the system. If you prefer one of the better known commercial products, then Thomas recommends using Sophos.(Thank you to Thomas Reed for these recommendations.) If you already use Sophos, then be aware of this if you are using Mavericks: OS X Mavericks- Sophos Anti-Virus on-access scanner versions 8.0 - 9.1 may cause unexpected restarts
    From user Joe Bailey comes this equally useful advice:
    The facts are:
    1. There is no anti-malware software that can detect 100% of the malware out there.
    2. There is no anti-malware that can detect anything targeting the Mac because there
         is no Mac malware in the wild, and therefore, no "signatures" to detect.
    3. The very best way to prevent the most attacks is for you as the user to be aware that
         the most successful malware attacks rely on very sophisticated social engineering
         techniques preying on human avarice, ****, and fear.
    4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on
        your computer is intended to entice you to install their malware thinking it is a
        protection against malware.
    5. Some of the anti-malware products on the market are worse than the malware
        from which they purport to protect you.
    6. Be cautious where you go on the internet.
    7. Only download anything from sites you know are safe.
    8. Avoid links you receive in email, always be suspicious even if you get something
        you think is from a friend, but you were not expecting.
    9. If there is any question in your mind, then assume it is malware.

  • Just moved my email from entourage to Mail. Having real problems with getting my signatures to work properly. When adding in a small company logo, windows computers only receive signature as an attachment. Am sending email as Rich Text. Any ideas on a fix

    Just moved my email from Entourage to Mail. Having real problems with getting my signatures to work properly despite sending email as Rich Text.
    When adding in a small company logo to the signature, PC's / windows computers only receive signature and logo as attachments.
    I've tried all possible fixes I can find including getting a PC user to format the logo but no joy. Has anyone experienced this and any ideas on a fix gratefully received.

    Send it as html so the signature is an image source URL

  • My site on mozilla firefox is having many problems ,can not blog,cannot reply to messages, the screen is alot smaller and other issues, please respond.

    My site on Mozilla Firefox is having many problems, can not blog, can not reply to messages in inbox , the page is a lot smaller and other problems. Please reply. Thank you

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • I am having a small problem. with Media Go??

    I have a program call " Creative MediaSource Go!" but when click on it to open so i can do some setup, nothing happens. Is ee the hour glass then nothing happens. I already updated with creative. please can some one tell me wat i am missing yo get the "Creative MediaSource Go!" to open and run ??

    Having this problem too: IT'S REALLY REALLY ANNOYING!!! Anyone have an idea how to sort this?

  • Having a problem with Firefox using Hotmail email. Inbox - as checking messages it freezes up or a 1 item window follows cursor and does not allow you to enter

    I am having a problem accessing Hotmail email messages via Fireflox server. When I am in the Inbox, reviewing messages, it either freezes up or a "1 item" small icon window follows cursor and does not allow me to enter messages or do anything. Have to log off and start over. Suggestions>?

    Can you detect any pattern to it, whether related to messages with attachments, or particular advertising on the page, etc.?
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    1. Clear Firefox's Cache
    orange Firefox button ''or'' Tools menu > Options > Advanced
    On the Network mini-tab > Offline Storage : "Clear Now"
    2. If needed, delete the site's cookies here
    While viewing a page on the site, right-click and choose View Page Info > Security > "View Cookies"
    (Usually the dialog will refer to live.com rather than hotmail.com, that's normal.)
    Then try reloading the page and logging in again. Does that help?

  • I am having a problem with my 2009 Macbook Pro

    Hello Everyone,
    I am having a problem with my 2009 Macbook Pro .  A few weeks ago I plugged it into the charger after running it down to reserve battery power. It appeared to be charging, but then all of a sudden my clock and calender reset to year 2000 and then my computer blacked out and went dead. I tried to boot it up but nothing happened (literally nothing).   I have tried 3 different chargers on it, but all I get is a faint green light and even after hours it still won't boot up.   I have tried replacing the battery, but still nothing happens.
    Any Ideas?  I am pretty desperate to get my computer back up and running before school finals.

    You may have to see if an authorized Apple service specialist can check over
    the charging system (magsafe dc-in board, power adapter, and MacBook/Pro)
    and test or run a diagnostic on it, to be sure there is no damage or failed parts.
    When you attached the adapter to charge the computer, after it said it was going
    to reserve power, did you shut down open applications and stop using the MB/Pro?
    That would've been the thing to do, since the margin of run-time near the bottom
    of the power cycle can be wrong by the gauge estimate, it can just quit.
    While I have not researched your year/model/series in detail, I do know some
    models of Apple portable computers have a small battery or capacitor on the
    logic board, separate from the main power battery; it may need replacement.
    A service provider w/ Apple training & parts would be a likely resource to fix it.
    Good luck & happy computing!

  • Im haveing a problem with google map in my adobe edge web page file project

    ok iv set my google map for a certain address in adobe edge however when I load the file in a internet browser the map is scrolled further away from the address and marker that is placed on the address.
    the problem is that when I load the page the map is not on target it looks like this
    the map should look like this
    here is the link to download the site project files
    https://www.dropbox.com/s/5mtq1medqd1bh5w/storewebsite2.zip
    Also im having this problem with it it when I load the map its on target when I  place this code in a trigger on the timeline
    var container = sym.$("container");
    var   map = '<iframe width="'+container.width()+'"   height="'+container.height()+'" frameborder="0" scrolling="no"   marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=7120+Boul      +St+Laurent,+Montreal,+QC,+Canada&aq=0&oq=7120+boul+st&sll=45.534114,  -    73.617124&sspn=0.006907,0.016512&ie=UTF8&hq=&hnear=7120+Boulevard+Sai  n   t-Laurent,+Montr%C3%A9al,+Communaut%C3%A9-Urbaine-de-Montr%C3%A9al,+Q u    %C3%A9bec+H2S,+Canada&t=m&z=14&ll=45.534114,-73.617124&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=7120+Bo      ul+St+Laurent,+Montreal,+QC,+Canada&aq=0&oq=7120+boul+st&sll=45.53411  4    ,-73.617124&sspn=0.006907,0.016512&ie=UTF8&hq=&hnear=7120+Boulevard+S  a   int-Laurent,+Montr%C3%A9al,+Communaut%C3%A9-Urbaine-de-Montr%C3%A9al, +   Qu%C3%A9bec+H2S,+Canada&t=m&z=14&ll=45.534114,-73.617124" style="color:#0000FF;text-align:left">View Larger Map</a></small>'
    container.html(map)
    however when I place the code in creationcomplete it plays the google map off target to a different address. Any ideas

    Please correct your download file - it will not open/unzip - it says it is currupted or damaged.
    D

  • Very small problem RE: Variable not initializing

    //Hey, folks! Having a small problem here. Compiler keeps telling me that "result" variable may not have been initialized for this method. This is probably an issue of variable scope? It's staring me in the face and I can't see the problem. Can you see the problem?      
    public Shape randomShape()
              Random generator = new Random();
              intShapeDecider = generator.nextInt(3);
              int intCrdntX1 = generator.nextInt(500);
              int intCrdntY1 = generator.nextInt(500);
              int intCrdntX2 = generator.nextInt(500);
              int intCrdntY2 = generator.nextInt(500);
              int intWidth = Math.abs(intCrdntX1 - intCrdntX2);
              int intHeight = Math.abs(intCrdntY1 - intCrdntY2);
              Shape result;
              if (intShapeDecider == 0)
                   result = new Line2D.Double(intCrdntX1,intCrdntY1,intCrdntX2,intCrdntY2);
              else if (intShapeDecider == 1)
                   result = new Rectangle(intCrdntX1,intCrdntY1,intWidth,intHeight);
    else if (intShapeDecider == 2)
              result = new Ellipse2D.Double(intCrdntX1,intCrdntY1,intWidth,intHeight);
              return result;
         }

    Nope...don't think that's the problem. My random ints are only 3 possible nums ...0,1, or 2. I have an if for each possible condition. Therefore, nothing "else" can really happen. No?

  • I am having a problem when i open a new tab with multiple images. If there is more than five or six images they won't all open.

    I open emails with multiple images. The new version is having a problem opening a tab with more than maybe 6 or 7 images. Older versions sometimes had the same problem but the unopened images appeared on the page as a small blank box that you could try to reload. Not anymore. Now you have to reload the whole tab. Sometimes this works other times it doesn't.

    You seem to be using a beta version. Maybe go back to a regular release and wait for V. 30 to become a regular release, and maybe whatever bug it is will be fixed.

  • While on Pinterest my iPad shuts off randomly, is anyone else having this problem?  It's very annoying.... 

    Is anyone else having this problem?

    Hey Morrly,
    I would follow these steps to troubleshoot the issue you're encountering with using the Pinterest app:
    1. Update your device software
    Update your device to the latest version of iOS.
    2. Check for app updates
    You can setup apps to update automatically in Settings > iTunes & App Store, but make sure that your apps are up to date:
    Open the App Store and tap Updates. If updates are available, tap Update All.
    If  prompted, enter your iTunes Store account information. App Store will then download and install the app updates.
    Note: Some apps may require a Wi-Fi connection to update.
    3. Install another app from the App Store
    If none of your user-installed apps will launch, there could be an issue with Apple ID authorization. Download and install an app that isn't already installed on your device to reset this information. You can also remove an app from your iOS device and download it again from the App Store or sync the app from your computer.Note: If you have installed apps using multiple Apple ID accounts, you may need to perform this step for each account.
    4. Restart the app
    If the issue affects only a single app, try closing just that app.
    5. Restart your device
    Turn the device off and on.
    6. Reinstall the affected app
    Remove the app from your device and reinstall it:
    Tap and hold any app icon on the Home Screen until the icons start to wiggle and show a small "x" in the top-right corner of the app.
    Tap the "x" in the corner of the app you want to delete.
    Tap Delete to remove the app and all of its data from your device.
    Press the Home button.
    Go to the App Store.
    Search for the app and then download it again.
    Note: If it is a paid app, ensure you are using the iTunes account you purchased the app with originally. If it is not, you may be asked to purchase the app again. Learn more about downloading previously purchased items.
    7. If the issue is still unresolved, contact the developer
    If you continue to experience the issue, contact the developer of the app for further assistance:
    Find the app in the App Store.
    Open the app's page, tap Reviews, and then App Support.
    via: iOS: Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/TS1702
    Sincerely,
    Delgadoh

  • Small problem

    I am very new to java, and having a small problem:
    When i click on a button, i want the buttons name to be displayed
    in a text field, saying "You have pressed" then the name of the button.
    but i want to do this with multiple buttons and not just one button, so i want to be able to press any button and its name to be displayed in a text field.
    your help will be appreciated

    Sorry if i did not display code, thanks to all those who replied, heres some of the code, if i have gone wrong in any where could you please help me too correct, i think you will have a general idea of what i am trying to achieve:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Button;
    import java.lang.Object;
    public class Calculator extends Applet implements ActionListener
    Button b1 + b2 + b3 + b4 + b5 + b6 + b7 + b8 + b9 + b10 + b11 + b12 + b13 + b14 + b15 + b16 + b17 + b18;
    setLayout(new GridLayout(5,4));
    public void init( );
    Button b1 = new Button( "1" );
    b1.addActionListener ( this );
    add(b1);
    Button b2 = new Button( "2" );
    b2.addActionListener ( this );
    add( b2 );
    Button b3 = new Button( "3" );
    b3.addActionListener ( this );
    add( b3 );
    Button b4 = new Button( "4" );
    b4.addActionListener ( this );
    add( b4 );
    Button b5 = new Button( "5" );
    b5.addActionListener ( this );
    add( b5 );
    Button b6 = new Button( "6" );
    b6.addActionListener ( this );
    add( b6 );
    Button b7 = new Button( "7" );
    b7.addActionListener ( this );
    add( b7 );
    Button b8 = new Button( "8" );
    b8.addActionListener ( this );
    add( b8 );
    Button b9 = new Button( "9" );
    b9.addActionListener ( this );
    add( b9 );
    Button b10 = new Button( "10" );
    b10.addActionListener ( this );
    add( b10 );
    Button b11 = new Button( "+" );
    b11.addActionListener ( this );
    add( b11 );
    Button b12 = new Button( "-" );
    b12.addActionListener (this );
    add( b12 );
    Button b13 = new Button( "x" );
    b13.addActionListener ( this );
    add( b13 );
    Button b14 = new Button( "/" );
    b14.addActionListener (this );
    add( b14 );
    Button b15 = new Button( "MC" );
    b15.addActionListener ( this );
    add( b15 );
    Button b16 = new Button( "MR" );
    b16.addActionListener ( this );
    add( b16 );
    Button b17 = new Button( "M+" );
    b17.addActionListener ( this );
    add( b17 );
    Button b18 = new Button( "c" );
    b18.addActionListener ( this );
    add( b18 );
    after this i get stuck, i don't know how to create a small text field that syas you have pressed (then the button name) if this coding is wrong, can you please explain what i have done wrong!
    Thanks

  • Small problem led to big problem

    I had a few contacts that existed on my Centro which did not exist on my desktop.  So I contacted the Palm Chat Support.  The person who helped me had me perform several things which eventually led to my phone getting stuck in a loop.  Things were not getting better so I asked to be transferred to a supervisor.  The supervisor told me the only solution was a hard reset.  I finally agreed to this.  Now when I reinstall any applications (not third-party) such as calendar or address book, my phone won't come on.  I can see the calendar or the address book but when I go to turn on the phone, it goes back into the endless loop.  A soft reset will not take it out of the loop, only a hard reset.  When I do a hard reset, I then have the ability to use the phone again but I have no data in my calendar, address book, etc.  So essentially I have either a PDA or a Phone--but I can't have both.  This started as a very small problem (a few missing contacts which I could have probably/should have probably just manually entered into the desktop).  Now I have a very big problem, simply b/c of what I was directed to do by Support.  Is there any hope?
    Post relates to: Centro (AT&T)

    There could be to issues going on here that you are having this result. One thing could be corrupted data such as your contacts or calendar, the other could be corrupted programs that are coming back from a hotsync.
    The first I would like to troubleshoot as it is the easiest. To fix this what we need to do is hard reset your device. The instructions to do that is here http://kb.palm.com/wps/portal/kb/common/article/887_en.html this tells you how to do all types of resets. Also, what we need to do is rename your backup folder. What this folder is, it hold all your programs from the last time you synced your PC. On your computer go here
    Palm Desktop 4.2 and below
    My Computer--> C drive --> Program files --> Palm/PalmOne--> your hotsync username
    Palm Desktop 6.2.2
    My Documents/Documents --> Palm OS Desktop --> your hotsync username
    Right click on your backup folder and rename it to "backupOld". Resync your device to the same user name and you will get all your contacts, calendar, tasks, and memos.
    You can install the programs again but make sure they are compatible with the device. Also try one program again and wait 24 hours to see if the same thing happens again. This way you know what program is causing the issue.
    If you have any questions about this or if this does not work please post back.

  • MAC OSX 10.3.6 having Boot Problems(Gray Screen with Spinning wheel all the Time) ,How to restore all the files without Mac Startpup Disc,still is not possible i want to download full CD from Apple Site, Is It Possible to Download!

    Hi Frnds,Small Favour for me,...
    MAC OSX 10.3.6 having Boot Problem(Gray Screen with Spinning wheel all the Time) ,How to restore all the files without Mac Startpup Disc,still is not possible i want to download full CD from Apple Site, Is It Possible to Download!, Windows 7 is working perfectly , can i restore any files in MAC OSX 10.3.6 through Windows 7, or i need the MAC OSX 10.3.6 Bootable Files i need to enter the MAC OSX....

    Hi Frnds,Small Favour for me,...
    MAC OSX 10.3.6 having Boot Problem(Gray Screen with Spinning wheel all the Time) ,How to restore all the files without Mac Startpup Disc,still is not possible i want to download full CD from Apple Site, Is It Possible to Download!, Windows 7 is working perfectly , can i restore any files in MAC OSX 10.3.6 through Windows 7, or i need the MAC OSX 10.3.6 Bootable Files i need to enter the MAC OSX....

  • I can't complete the 5.0 update without choosing icloud, anyone else having this problem?

    I can't complete the 5.0 update without choosing icloud, anyone else having this problem?

    You can't just select "skip"?  It's at the bottom and is in smaller print.

Maybe you are looking for

  • Please help!!! Maps is not working anymore in my N...

    Hello guys, I happen to use the maps before in find place under address. I can see the roads and blocks on the map moving when you try to use the cursor keys. But when I visited nokia site, I found there is the latest map loader to download latest ma

  • Not liking iTunes right now!

    Ok, I had some video's in my iTunes that didn't work. So I thought maybe if I go to the apple site and look in support, I'll find out how to get them to work. It told me to sync the video's. So I did. GREAT!!! Now all of my 487 songs are gone and non

  • ADF Taskflow with parameters in table

    Hi, I am developing a component that renders a user list. The first column is an image being rendered dynamically based on the user id and the second one shows the user name with a popup being displayed on rollover. The pop-up content must display a

  • How to create value request for screen field text box tt1

    How to create value request for screen field text box tt1 i have a text box name tt1, i want f4 help for that . remember i am asking for screen i.e done from screen layout not selectio-screen. Thank you, Regards, Jagrut Bharatkumar Shukla,

  • IPod does not function well. i need help!!

    I got this iPod, bought frm korea. Tried to dwnld songs in it. Wen connected to computer, it doesnt come out in iTunes. It comes out at mycom. Wen i dwnld songs manually, it cannot be play & my ipod went blank and turn off. went i connect it back, th