错误(异常)处理如何在企业应用程序中起作用

发布于 2025-01-30 10:13:59 字数 224 浏览 3 评论 0原文

我是新鲜的开发人员,我想知道如果服务器端异常投掷,应用程序的行为如何?处理异常是什么?我知道,如果与服务器有关的任何事情都会与我们通知最终用户,则使用某种“ 500个内部服务器错误”页面通知最终用户。

我的问题是,开发人员将如何知道应用程序发生错误?我们要使用某种伐木吗?如果是,开发人员是否会不断检查已记录的信息,还是使用Logger使用某种通知系统?

抱歉,如果这是一个愚蠢的问题,但我真的对此一无所知

I am fresh developer I want to know how does application behaves if a server side exception thrown? what is the flow of handling exception? I know that if anything happens related with server we are notify end user with some kind of "500 internal server error" page.

What my question is how developers will know that there is an error occured in application? Are we gonna use some kind of logging? if yes, does developers constantly checks logged information or are they using some kind of notification system with logger ?

sorry if it's a silly question but I really dont have any idea about it

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

呆萌少年 2025-02-06 10:13:59

是的,通常会有某种通知系统以及日志记录系统。

这确实是您团队/项目的独立决定。

虽然您可能会记录所有错误,但您还会有一些问题向您报告错误,例如,通过发送电子邮件以获取更严重的错误(并非所有错误),

但是 您如何向开发人员报告这些错误真的取决于你。例如,您可以使用第三方,例如 raygun 您可以在仪表板中看到它们。

另一个问题是,许多错误可能归结为随机用户问题(实际上不是代码错误),因此您需要过滤自己通知的内容

Yes usually there will be some kind of notification system along with the logging.

This is really an independent decision for your team/project.

Whilst you would probably log all the errors you would also have something in place for reporting errors to you, e.g. via sending emails for more serious errors (not all errors)

But how you report these errors to the developer is really up to you. For example you could use a third party such as raygun, so all your error reprots go there and you can see them in a dashboard.

The other issue is that lots of those errors might be down to random user issues (and not actually code bugs) so you'd want to filter what you notify yourself about

比忠 2025-02-06 10:13:59

这显然会因项目而异,但我可以通过(有限的)经验来讲话。我对我们的原木没有太多的见识,因为这往往会保留到管理Azure Portal的Lead Devs。在很大程度上,在我们的控制器中,我们将丢弃将登录到控制台的错误,他们通常会说出它们来自模型状态的其他信息所源于哪些对象。

当我们有客户报告问题时,我们主要知道错误(这可能是运行速度缓慢或可能无法正常工作的某些组件),或者我们的操作团队在推送到生产站点之前在测试时会发现问题。

This will vary from project to project obviously but I can speak from my (limited) experience. I don't get too much of an insight to our logs as this tends to be kept to our lead devs who manage our Azure portal. Largely in our controllers we will throw errors that will be logged to the console and they will usually say what objects they originate from with other information from the Model state.

We mainly know about the errors when we have clients report issues (this could be the application running slow or perhaps certain components of it just not working) or if our operation team finds an issue when testing before pushing to our production sites.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文