exception

    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> #

    0热度

    2回答

    我为VB.net一个新手程序员 所以我一直停留在这个代码,这是随机名称生成。 Private Function RandomLname(ByRef ranLname As String) As String Dim reader As StreamReader = My.Computer.FileSystem.OpenTextFileReader("[pathto file.

    4热度

    2回答

    在C++ 11及更高版本的标准中,是否保证当函数返回一个类对象时调用(可能是异常抛出)拷贝是而不是 - 如果为此类定义了移动ctor?背景:假设 struct X { X() {} X(const X&) {/* code that might throw exceptions */} X(X&&) {/* code that never throws excepti

    0热度

    1回答

    我明白我在以下问题中所要求的几乎没有实际应用,但我想知道是否可以在Java中执行。 我希望能够用两个单词(第一个单词将被忽略,第二个单词被视为一个有效的异常类型,它将是)来定义一个throws声明。 所以基本上我想,看起来像这样的方法签名编译: public void foo() throws A Fit {} 这里所说的“A”被简单地忽略,然后我会Fit定义为自定义异常(如你通常会做到这一点

    4热度

    1回答

    由于科特林不支持checked异常那么如何让程序员知道,一个方法可能引发的异常 简单的例子: class Calculator (value: Int = 0) { fun divide (dividend: BigDecimal, divider: BigDecimal) : BigDecimal { return dividend/divider } }

    3热度

    1回答

    我正在研究用F#编写的WebApi项目。下面的代码段: module MyModule open System let MyGuid = Guid.Parse "934F0B12-D00A-491D-862D-EE745EF3C560" let myFunction list = list.Get(MyGuid) // --> here MyGuid has the Type