exception

    -2热度

    1回答

    这个错误让我的神经。 Exception in thread "main" java.util.NoSuchElementException at java.util.Scanner.throwFor(Scanner.java:862) at java.util.Scanner.next(Scanner.java:1485) at java.util.Scanner.

    -1热度

    2回答

    我将字符串转换为Integer,所以当我收到任何字符时,抛出异常并且执行停止。我想跳过那个字符并打印所有剩下的数字,所以我一直在while循环中捕获。但是现在,对于每一个异常,都会抛出一个错误,其余的数字按照异常打印出来,但是一旦抛出异常,代码必须发送邮件给团队(我将把邮件部分放入catch中)。如果代码在每次抛出异常时发送邮件都不好,所以我必须收集while循环内的所有异常并一次性发送有关所有异

    -2热度

    2回答

    如何处理EmptyStackException这段代码?在阅读文件的一部分后,显示我的堆栈是空的。我猜它与push()和pop()方法有关,但不完全确定。 Stack<Integer> stack = new Stack<Integer>(); int op1, op2, result = 0; String token; StringTokenizer tokeni

    2热度

    1回答

    我有我自己的异常,由我的类BrowserException抛出。 这可能是因为某些内部问题,即UnsupporderEncodingException。 现在我有两个选择: Throwable.addSuppressed(Throwable异常) Throwable.initCause(Throwable的原因) 在例外情况,就是suppressedException和事业之间的区别? 我什么时候

    0热度

    1回答

    我想从两个文本框输入输入创建两个整数的字符串添加在一起。我不断收到,基本上只是说:“索引必须是该列表的范围内” 这里的错误是我的代码 private char[] array1; private char[] array2; String input1 = tbUserInput1.Text; array1 = input1.ToCharArray(); int[]

    0热度

    1回答

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Text.RegularExpressions;

    1热度

    1回答

    我已经实现了一些功能,允许处理应用程序服务器上的套接字连接。这里是我的代码摘录: @Dependent public class SocketServerService { @Resource(name = "DefaultManagedThreadFactory") private ManagedThreadFactory threadFactory; pri

    0热度

    1回答

    每次我尝试选择一个单元格是不可见的时候,我得到一个异常: let cell = collectionView.cellForItem(at: indexPath) as! CustomCell 这就是为什么我决定先滚动到它,所以它得到分享范围,然后选择它: collectionView.scrollToItem(at: indexPath, at: [], animated: true) l

    0热度

    2回答

    我正在写一个基于Quickfix/N的FIX引擎,它侦听交易执行(ExecutionReport)并将它们保存到数据库中。 如果接收到的消息中不存在该值,则从API请求字段值将引发FieldNotFoundException。举例来说,如果帐户不存在,调用executionReport.Account将抛出异常。 由于有些字段是可选的,我必须在获取字段值之前明确检查字段值的存在。 我有两个可能性:

    4热度

    1回答

    经过12年的间歇后回到C++开发。我使用JetBrains的CLion软件,这非常棒,因为它提供了关于我的班级设计中可能出现的问题的大量输入。我在课堂上的构造函数throw statement中得到的警告之一是:Thrown exception type is not nothrow copy constructible。以下是生成此警告的代码示例: #include <exception> #