Try/Catch Block and Event Viewer

Posted on 2008-11-17
Last Modified: 2012-05-05
If i'm using a try/catch block in a stored procedure and an exception is throw will the exception be logged in the event viewer or do I explicitly need to insert a record into the event viewer?
Question by:davidcahan
    LVL 8

    Accepted Solution

    You need to insert your exception to anywhere. It wont insert to event viewer.

    Author Comment


    Author Comment

    actually...let me make sure I fully understand.  I know this might be the wrong forum, but are you saying that the only reason I see DB exceptions in the event viewer to begin with is because .NET puts them there when an exception is raised.  And conversely, that SQL Server in and of itself has nothing to do with the fact that I see the exception in the event viewer?
    LVL 8

    Expert Comment


    Author Comment

    so how do i insert the event into the event viewer from SQL Server.  I assume this is possible?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
    Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now