Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在 Hudson 服务器中执行一个 java 脚本。如果 java 失败,我想抛出新错误,但我不知道该怎么做。我想抛出新错误,因为我配置了在此处输入图像描述错误时发送新电子邮件。
解决方案是通知VM进程失败,方法是:System.exit(1)(在catch块中)