Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-501

all exceptions are not handled, and all message is "CUBRIDException was unhandled by user code"

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: ADONET-Aprium
    • Fix Version/s: ADO.NET 9.2.0.0002
    • Component/s: ADO.NET
    • Labels:
      None
    • Environment:

      Test build: 9.1.0.0212
      Server OS: Linux 64 bit

      Description

      Reproduced steps:
      1. Create a CUBRID connection
      2. Provide connection string to open a connection
      3. Close this connection again
      4. try to use that connection

      Result:
      message "CUBRIDException was unhandled by user code", all exception message are not handled.

      Expected result:
      Provide a clear error/exception message to user when error/exception happens

        Activity

        Hide
        cn15800 谢韦华[Bert] added a comment -

        add code to public method of connection:

        if(state == closed)
        throw exception

        Show
        cn15800 谢韦华[Bert] added a comment - add code to public method of connection: if(state == closed) throw exception
        Hide
        ryin005 Ray Yin added a comment - - edited
        • Test OS: Windows 32/64 bit
        • CUBRID: 9.2.0.0155
        • Driver: cubrid-ado.net 9.2.0.0002
        • Framework: .NET 4.0

        Test Code

        {code}
        CUBRIDConnection conn = new CUBRIDConnection();
        conn.ConnectionString = "server=localhost;database=demodb;port=33000;user=public;password=";

        try
        {
        String sql = "select * from code;";
        CUBRIDCommand cmd = new CUBRIDCommand(sql, conn);
        cmd.ExecuteNonQuery();
        }
        catch (Exception e)
        {
        Assert.AreEqual("The connection is not open!", e.Message);
        }{code}

        Test Result: Pass

        The issue could be closed

        Show
        ryin005 Ray Yin added a comment - - edited Test OS: Windows 32/64 bit CUBRID: 9.2.0.0155 Driver: cubrid-ado.net 9.2.0.0002 Framework: .NET 4.0 Test Code {code} CUBRIDConnection conn = new CUBRIDConnection(); conn.ConnectionString = "server=localhost;database=demodb;port=33000;user=public;password="; try { String sql = "select * from code;"; CUBRIDCommand cmd = new CUBRIDCommand(sql, conn); cmd.ExecuteNonQuery(); } catch (Exception e) { Assert.AreEqual("The connection is not open!", e.Message); }{code} Test Result: Pass The issue could be closed

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            sc14140 李应
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: