/// <summary> /// Decode an exception from an input stream </summary> /// <param name="input"> Data input </param> /// <returns> Decoded exception </returns> /// <exception cref="IOException"> On IO error </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public static FriendlyException decodeException(DataInput input) throws IOException public static FriendlyException decodeException(DataInput input) { DecodedException cause = null; while (input.readBoolean()) { cause = new DecodedException(input.readUTF(), input.readBoolean() ? input.readUTF() : null, cause); cause.StackTrace = decodeStackTrace(input); } FriendlyException exception = new FriendlyException(input.readUTF(), typeof(Severity).EnumConstants[input.readInt()], cause); exception.StackTrace = decodeStackTrace(input); return(exception); }
/// <param name="className"> Original exception class name </param> /// <param name="originalMessage"> Original exception message </param> /// <param name="cause"> Cause of this exception </param> public DecodedException(string className, string originalMessage, DecodedException cause) : base(className + ": " + originalMessage, cause) { this.className = className; this.originalMessage = originalMessage; }