How to log Client Side exceptions in StackExchange.Exceptional?
Asked Answered
B

1

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?

Bildungsroman answered 31/3, 2017 at 7:9 Comment(0)
D
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.

Diligent answered 31/3, 2017 at 7:58 Comment(4)
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?Bildungsroman
whats the point of generating server side exceptions from client side?Diligent
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.Diligent
why do you prefer StackExchange.Exceptional over other loggers?Bildungsroman

© 2022 - 2024 — McMap. All rights reserved.