| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | using IceRpc.Ice.Codec; |
| | | 4 | | using System.ComponentModel; |
| | | 5 | | |
| | | 6 | | namespace IceRpc.Ice; |
| | | 7 | | |
| | | 8 | | /// <summary>Represents the base class for exceptions defined in Ice.</summary> |
| | | 9 | | public abstract class IceException : Exception |
| | | 10 | | { |
| | | 11 | | // Uses the default parameterless constructor. |
| | | 12 | | |
| | | 13 | | /// <summary>Encodes this exception.</summary> |
| | | 14 | | /// <param name="encoder">The Ice encoder.</param> |
| | 24 | 15 | | public void Encode(ref IceEncoder encoder) => EncodeCore(ref encoder); |
| | | 16 | | |
| | 30 | 17 | | internal void Decode(ref IceDecoder decoder) => DecodeCore(ref decoder); |
| | | 18 | | |
| | | 19 | | /// <summary>Decodes an Ice exception.</summary> |
| | | 20 | | /// <param name="decoder">The Ice decoder.</param> |
| | | 21 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 22 | | protected abstract void DecodeCore(ref IceDecoder decoder); |
| | | 23 | | |
| | | 24 | | /// <summary>Encodes this Ice exception.</summary> |
| | | 25 | | /// <param name="encoder">The Ice encoder.</param> |
| | | 26 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 27 | | protected abstract void EncodeCore(ref IceEncoder encoder); |
| | | 28 | | } |