internal bool ThrowException(SevenZipBase handler, params Exception[] e) { if (this._ReportErrors && (handler == null || !handler.Canceled)) { throw e[0]; } return(false); }
protected void CheckedExecute(int hresult, string message, SevenZipBase handler) { if (hresult == 0 && !handler.HasExceptions()) { return; } if (!handler.HasExceptions()) { if (hresult < -2000000000) { this.ThrowException(handler, (Exception) new SevenZipException("The execution has failed due to the bug in the SevenZipSharp.\nPlease report about it to http://sevenzipsharp.codeplex.com/WorkItem/List.aspx, post the release number and attach the archive.")); } else { this.ThrowException(handler, (Exception) new SevenZipException(message + hresult.ToString((IFormatProvider)CultureInfo.InvariantCulture) + (object)'.')); } } else { this.ThrowException(handler, handler.Exceptions[0]); } }