| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | #nullable enable |
| | | 4 | | |
| | | 5 | | using System.ComponentModel; |
| | | 6 | | |
| | | 7 | | namespace Ice; |
| | | 8 | | |
| | | 9 | | /// <summary> |
| | | 10 | | /// Base class for all exceptions defined in Slice. |
| | | 11 | | /// </summary> |
| | | 12 | | public abstract class UserException : Ice.Exception |
| | | 13 | | { |
| | | 14 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 15 | | public virtual void iceWrite(OutputStream ostr) |
| | | 16 | | { |
| | 1 | 17 | | ostr.startException(); |
| | 1 | 18 | | iceWriteImpl(ostr); |
| | 1 | 19 | | ostr.endException(); |
| | 1 | 20 | | } |
| | | 21 | | |
| | | 22 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 23 | | public virtual void iceRead(InputStream istr) |
| | | 24 | | { |
| | 1 | 25 | | istr.startException(); |
| | 1 | 26 | | iceReadImpl(istr); |
| | 1 | 27 | | istr.endException(); |
| | 1 | 28 | | } |
| | | 29 | | |
| | | 30 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 1 | 31 | | public virtual bool iceUsesClasses() => false; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Initializes a new instance of the <see cref="UserException" /> class. |
| | | 35 | | /// </summary> |
| | | 36 | | protected UserException() |
| | 1 | 37 | | : base(message: null, innerException: null) |
| | | 38 | | { |
| | 1 | 39 | | } |
| | | 40 | | |
| | | 41 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 42 | | protected abstract void iceWriteImpl(OutputStream ostr); |
| | | 43 | | |
| | | 44 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 45 | | protected abstract void iceReadImpl(InputStream istr); |
| | | 46 | | } |