< Summary

Information
Class: Ice.Internal.RetryException
Assembly: Ice
File(s): /home/runner/work/ice/ice/csharp/src/Ice/Internal/Ex.cs
Tag: 71_18251537082
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 46
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 2
Total methods: 2
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get()100%11100%

File(s)

/home/runner/work/ice/ice/csharp/src/Ice/Internal/Ex.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using System.Diagnostics;
 4
 5namespace Ice.Internal;
 6
 7public static class Ex
 8{
 9    public static void throwUOE(Type expectedType, Ice.Value v)
 10    {
 11        if (v is UnknownSlicedValue usv)
 12        {
 13            throw new MarshalException($"The Slice loader did not find a class for type ID '{usv.ice_id()}'.");
 14        }
 15
 16        string type = v.ice_id();
 17        string expected;
 18        try
 19        {
 20            expected = (string)expectedType.GetMethod("ice_staticId").Invoke(null, null);
 21        }
 22        catch (System.Exception)
 23        {
 24            expected = "";
 25            Debug.Assert(false);
 26        }
 27
 28        throw new MarshalException(
 29            $"Failed to unmarshal class with type ID '{expected}': the Slice loader returned class with type ID '{type}'
 30    }
 31
 32    public static void throwMemoryLimitException(int requested, int maximum)
 33    {
 34        throw new MarshalException(
 35            $"Cannot unmarshal Ice message: the message size of {requested} bytes exceeds the maximum allowed of {maximu
 36    }
 37}
 38
 39public class RetryException : System.Exception
 40{
 41    private readonly Ice.LocalException _ex;
 42
 143    public RetryException(Ice.LocalException ex) => _ex = ex;
 44
 145    public Ice.LocalException get() => _ex;
 46}

Methods/Properties

.ctor(Ice.LocalException)
get()