c#console应用程序默默退出 [英] c# console application silently exits

查看:197
本文介绍了c#console应用程序默默退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小型的c#控制台应用程序,它使用第三方lirbary读取数据并存储到Oracle中。

I have a small c# console application that use a 3rd party lirbary to read data and store into Oracle.

它适用于本地环境。一旦它被部署到prod,它部分工作(在处理固定数量的文件后一致)并退出执行而不会捕获任何异常或最终阻止。

It works in local environment. Once it got deployed into prod, it works partially(consistently after processing fixed number of files) and exits the execution without catching any exception or finally block.

你可以帮助我抓住这个例外?

Could you help me with this catching the exception?

最好的问候

推荐答案

有很多可能性。如果使用第三方库的所有代码都在try块中并且没有捕获任何内容,那么这意味着库不会抛出任何异常,或者至少是任何可以捕获和跟踪的异常。由于我没有足够的
信息来得出你应该做什么的任何结论,我不能给你一个确定的答案。但是,我认为它与将应用程序部署到生产中时发生的变化有关,例如不同的构建设置或配置,
导致某些文件不兼容。祝你好运! 
There are many possibilities. If all code using the third party library is within the try block and nothing is being caught, then it means the library is not throwing any exceptions or at least any that you can catch and trace. Since I don't have enough information to come to any conclusions on what you should do, I cannot give you a definitive answer. However I would imagine that it has to do with something that changed when the app was deployed into production such as a different build setup, or configuration, causing incompatibility for certain files. Wish you the best of luck! 


这篇关于c#console应用程序默默退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆