为什么我会得到未捕获的异常并退出程序? [英] Why do i get uncaught exception and the program exits?

查看:94
本文介绍了为什么我会得到未捕获的异常并退出程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

展开 | 选择 | Wrap | 行号

推荐答案

danielo,


你必须原谅我,但我必须指出您的代码完全未经测试。


由于第3行和第12行的语法错误而无法编译。


此外, main 函数应返回 int


请修复语法错误,以及 main 的问题,并重新发布你的问题。


祝你好运!

Oralloy
danielo,

You must excuse me, but I have to point out that your code is completely untested.

It won''t compile due to syntax errors at lines 3 and 12.

In addition, the main function is supposed to return an int.

Please fix the syntax errors, as well as the problem with main, and re-post your question.

Good Luck!
Oralloy


您好Danielo,


您还没有编码来捕获字符串异常。

或者您必须编写通用代码catch。
Hi Danielo,

you have not coded to catch a string exception.
Or you have to code for generic catch.


我明白了,但我正在捕捉Error类,其中包含接受字符串的构造函数..所以我不明白为什么不
i understand , but i am catching Error class which contains constructor that accepts string.. so i dont understand why not


这篇关于为什么我会得到未捕获的异常并退出程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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