internal IngresException(SqlEx.ErrInfo errinfo, IngresException _innerException) : base(errinfo.Msg, _innerException) { AddError(errinfo.Msg, errinfo.sqlState, errinfo.code); Exception innerException = _innerException; while (innerException != null) { AddError(innerException.Message, errinfo.sqlState, errinfo.code); innerException = innerException.InnerException; } }
Exception ISqlExFactory.AddError( Exception ex, String message, String sqlState, int nativeError) { IngresException provEx = ex as IngresException; if (provEx == null) // if not an IngresException, return { return(ex); // should not happen } provEx.Errors.Add( new IngresError(message, sqlState, nativeError)); return(ex); }