按照c++ primer上的程序,
if (argc != 3)
throw runtime_error("wrong number of arguments");
我故意把参数输入不是三个,然后应该抛出异常wrong number of arguments,但是我却是程序中断,显示
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.有谁知道为什么runtime_error不能执行报错处理,然后程序terminate了
...全文
28113打赏收藏
关于runtime_error的问题
按照c++ primer上的程序, if (argc != 3) throw runtime_error("wrong number of arguments"); 我故意把参数输入不是三个,然后应该抛出异常wrong number of arguments,但是我却是程序中断,显示 This application has requested the Runtime to terminate it in an unusual way. Please contact the applicatio
If no matching catch is found, then the program calls the library terminate function.Usually,terminate call the library function abort to exit the program.
An exception cannot remain unhandled. An exception is an important enough event that the program cannot continue executing normally. If no matching catch is found, then the program calls the library terminate function.Usually,terminate call the library function abort to exit the program.