Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-23786

.NET: OverflowException on ErrorGroups.Common.Internal

    XMLWordPrintableJSON

Details

    Description

      Add the following to ErrorGroupTests:

              [Test]
              public void TestExceptionProperties()
              {
                  var ex = new IgniteException(Guid.Empty, ErrorGroups.Common.Internal, "msg");
      
                  Assert.AreEqual(ErrorGroups.Common.Internal, ex.Code);
                  Assert.AreEqual(-1, ex.ErrorCode);
                  Assert.AreEqual("CMN", ex.GroupName);
                  Assert.AreEqual("IGN-CMN-1", ex.CodeAsString);
              }
      

      Result:

      System.OverflowException : Arithmetic operation resulted in an overflow.
         at Apache.Ignite.ErrorGroups.GetErrorCode(Int32 fullCode) in /home/pavel/w/ignite-3/modules/platforms/dotnet/Apache.Ignite/ErrorGroups.cs:line 51
         at Apache.Ignite.IgniteException.get_ErrorCode() in /home/pavel/w/ignite-3/modules/platforms/dotnet/Apache.Ignite/IgniteException.cs:line 65
         at Apache.Ignite.Tests.ErrorGroupTests.TestExceptionProperties() in /home/pavel/w/ignite-3/modules/platforms/dotnet/Apache.Ignite.Tests/ErrorGroupTests.cs:line 197
         at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
         at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
      

      Attachments

        Activity

          People

            ptupitsyn Pavel Tupitsyn
            ptupitsyn Pavel Tupitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: