Error handling? Why?



  • I'm the new addition to Application Support and Development. A buddy of mine here knows I read TDWTF every day so showed me something about one of our applications. It seems this include is at the top of almost every one of the pages in a particular application. An application, by the way, that is based on two other applications ... all built by programmers from the same consulting firm ... sharing much of the same design ... same code ... same includes.

    <%@ Language=VBScript enablesessionstate=true%> <% Option Explicit Response.Buffer = true Response.Expires = -1 on error resume next

    ' check if the user has a sessionID if not then redirect to logout page
    if len(Session("lngUserID")) < 1 then
    Response.redirect "Signout.asp"
    end if

    Function TS(str)
    return Replace(str,"'","''")
    End Function
    %>



  • I think you forgot to include the include.



  • @dabean said:

    I think you forgot to include the include.

    Yeah. I seem to be having a WTF myself.



  • @rudraigh said:

    @dabean said:

    I think you forgot to include the include.

    Yeah. I seem to be having a WTF myself.

     

    Well, are you gonna post it or not?



  • @joemck said:

    @rudraigh said:
    @dabean said:

    I think you forgot to include the include.

    Yeah. I seem to be having a WTF myself.

    Well, are you gonna post it or not?

    Including the include would, at this point, require error handling, as he had an error in his original post.  And, as the subject asks, "Why handle errors?"



  • @tgape said:

    Including the include would, at this point, require error handling, as he had an error in his original post.  And, as the subject asks, "Why handle errors?"

     



Log in to reply