Results 1 to 10 of 10

Thread: catch(e)

  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    catch(e)

    I am trying to troubleshoot a problem I have with an application I control. If I run the application from its server environment via RDC it works fine but then when I try and run it from a local client it writes an error on the offending asp page. The code looks similar to this:

    <pre>function Myfunction(value)
    {
    try{
    ....
    }catch(e){
    Response.Write("Error Occured");
    }
    }
    </SCRIPT>
    </pre>



    the variable e is declared and I am assuming that it is an error code which I am trying to trap so that I can look up the issue and try and resolve it.

    How can I display the value e, I have tried Response.Write and Alert but it does not show anything. Any ideas or am I reading this function wrong?
    Jerry

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: catch(e)

    Try
    <code>
    Response.Write("Error: " + err.description);</code>

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: catch(e)

    Thanks

    I was just sifting through my book and I saw this one too

    <code>{alert(e.message)}</code>

    So will try these ideas out tomorrow
    Jerry

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: catch(e)

    alert will put up a message box - can be very useful during debugging.

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: catch(e)

    Well the mystery thickens as I have now been able to identify the error message which is:

    'xml' is null or not an object

    This is unusual as this asp file that I am running works perfectly well on my production server but not on my Development and Test Servers so therefore of a strong mind it is not the coding more the server set up but maybe wrong. I have done a Google on this error and no real answers become obvious, if at all.

    Anybody seen anything similar?
    Jerry

  6. #6
    Star Lounger
    Join Date
    Sep 2004
    Location
    Wolverhampton, Staffordshire, England
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: catch(e)

    Looks like your using a variable that hasn't been initialized or you haven't referenced a required assembly, post some code to let me see? You can also do e.ToString() with response.write if you wanted

    Maybe you forgot to include a required dll in your distribution?

  7. #7
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: catch(e)

    Hi Danny

    Thanks, the code I have is from my CRM application, I know this code works as it is running smoothly on my production servers. However, I have copied all the files, lock, stock and barrel to my Dev and Test machines to no avail. I am sure the code is correct for this reason.

    We have been testing this via our SOAP adapters and we know data is being pulled through in the XML cloud however it is just not displaying and this error appears when logged on to the server via RDC. If however, I log onto the application from a client PC the error message changes to a more verbose and natural language stating

    "Named template 'formatDate' does not exist in the stylesheet" this indicates that the asp page which is rendering the XML is not connecting to the XSL file to extract the formatDate function.

    I am in the process of investigating if this has to do with security settings in IE and the application COM file. I am still lost as to why this is happening but I/we have taken coding errors out of the equation for the moment.
    Jerry

  8. #8
    Star Lounger
    Join Date
    Sep 2004
    Location
    Wolverhampton, Staffordshire, England
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: catch(e)

    Ugh CRM systems are a nightmare, i am currently re-writing one of our CRM systems at work, it's going quite well, though my data layer is using Entity Spaces over DataSets, not much XML involved at the minute (I should really I know, XML is the future), so alas I am unable to offer any help further, do you have a permissions system? Possibly check that you have enabled the correct entries in permissions, I always forget to update permissions in the database and have boggled over odd problems only to discover that fact hours later.

  9. #9
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: catch(e)

    Thanks Danny

    This is a 2,500,000 investment integrated with 3 major database systems (#4 at the weekend) interacting with 2,500 staff <img src=/S/nuts.gif border=0 alt=nuts width=15 height=15>

    I have been working on this on and off over the week and it is very much looking like a COM+ service playing up on the development machine. I am not going to worry about it too much as I am in the process of cloning and virtualising one of my live application network load balanced servers and make it my new test server, at least then I know it will work as per the live environment.

    My system is controlled by DTS packages at DB level and all files are direct copies. These issues are normally found to be at OS level as Developers step in and make changes. Virtualistion will allow rollback
    Jerry

  10. #10
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: catch(e)

    Hi Danny

    Thanks for your interest in this thread. The integration I was working on went live yesterday and we have finally been able to trap the cause of this error. We have discovered that it is not any fault of the code but the BizTalk server timing out with the XML cloud left in limbo.

    After remapping the database servers and a reboot we were able to log on via RDC and get a response. So all is well....until next time
    Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •