5

I am working on a web project and implemented StackExchange.Exceptional for server exceptions logging. I am just wondering if I could log my client side exceptions as well through StackExchange.Exceptional.

Is there any way to use this library for client-side exceptions logging?

Khawaja Asim
  • 1,327
  • 18
  • 38

1 Answers1

3

As far as client side logging is concerned there is no mechanism as per my knowledge. Because the developer never maintain any database of stuff on client side. Even if you save exception in client side storage that wont be a centralized approach and how will you be getting back again?

What you can do By client side you can log javascript's specific scenarios/Exceptions via Ajax Calls to your server in the same error logging module that you are using for server error logs and saving those exception you want to log in your database to have their centralized record.

Danyal Malik
  • 198
  • 11
  • Yeah, Stackoveflow.Exceptional catch and record server side exceptions implicitly. can we generate server side exceptions from client side so that exceptions will be caught by Exceptional and they will store that to the database? – Khawaja Asim Mar 31 '17 at 08:04
  • 1
    whats the point of generating server side exceptions from client side? – Danyal Malik Apr 01 '17 at 11:59
  • 1
    Although you can send what you want to log as a string via ajax call to server and then create a new instance of Exception and add that msg (from clientside) to that exception and throw it. – Danyal Malik Apr 01 '17 at 12:00
  • why do you prefer StackExchange.Exceptional over other loggers? – Khawaja Asim Apr 04 '17 at 05:27