locked
Exception handling (Global?)... RRS feed

  • Question

  • Hello,

    What's the best way to handle unexpected errors in a LS app?

    I want to get a mail with error details if an error occurred in my application...

    robert

    Wednesday, December 5, 2012 3:51 PM

Answers

  • I have to admit i was afraid to respond to this post as I can see cans and worms.

    The issue is that you would like to send an email if there is an error. If the error is client side you are relying on the client having a way of sending the issue. If it is server side (and you have total control of mail clients etc on the server) it is easier but by no means childsplay.

    I would recommend maybe trying something similar to this but replacing stored procedures with  a mail call?

    http://blogs.msdn.com/b/eric_erhardt/archive/2012/04/17/executing-a-simple-stored-procedure-in-lightswitch.aspx


    If you found this post helpful, please mark it as helpful. If by some chance I answered the question, please mark the question as answered. That way you will help more people like me :)

    • Proposed as answer by Yann DuranModerator Thursday, December 6, 2012 3:01 AM
    • Marked as answer by Angie Xu Thursday, December 20, 2012 1:40 AM
    Wednesday, December 5, 2012 5:18 PM

All replies

  • Hi robert

    What kind of error you are asking about?

    You have to test your application several times before release it. It should bug free. I think in lightswitch there is no built in way to send email if some error occour in your application.

    Regards


    Rashmi Ranjan Panigrahi
    www.lightswitchspecial.com

    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”.
    This will help other users to find their answer quickly.

    Wednesday, December 5, 2012 4:38 PM
  • of course I test my app but I cannot except hidden faults...

    in our "normal" desktop apps we have a global Exception handling with detail mail information sent to us if an error occurred...

    robert

    Wednesday, December 5, 2012 5:11 PM
  • I have to admit i was afraid to respond to this post as I can see cans and worms.

    The issue is that you would like to send an email if there is an error. If the error is client side you are relying on the client having a way of sending the issue. If it is server side (and you have total control of mail clients etc on the server) it is easier but by no means childsplay.

    I would recommend maybe trying something similar to this but replacing stored procedures with  a mail call?

    http://blogs.msdn.com/b/eric_erhardt/archive/2012/04/17/executing-a-simple-stored-procedure-in-lightswitch.aspx


    If you found this post helpful, please mark it as helpful. If by some chance I answered the question, please mark the question as answered. That way you will help more people like me :)

    • Proposed as answer by Yann DuranModerator Thursday, December 6, 2012 3:01 AM
    • Marked as answer by Angie Xu Thursday, December 20, 2012 1:40 AM
    Wednesday, December 5, 2012 5:18 PM
  • Every LOB/ERP solution requires a mission critical error logging system at a low level that is transparent to the application level coding.

    This is a critical functionality that we still need to develop for LS.

    Generally, we need to have logs in the event of a failure to write out to the database.

    There should be 2 "levels" of error transaction logging:  1) the database and 2) the IIS web site server file system.   If the database connection is broke #2 would be an automatic fallback.

    Sometimes I get errors like this:

    I know that the client and the server both had available memory.

    I want to know anytime a database operation fails.   This logging should not have to be hand carved at the application level with method coding.

    Thoughts?


    Garth Henderson - Vanguard Business Technology

    Thursday, December 6, 2012 7:56 PM
  • Hi robert

    I will mark Ot1s's reply as answer, if the marked answer is not helpful to solve your problem, please unmark and give quick response.

    Regards


    Angie xu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, December 20, 2012 1:41 AM