Code: Select all
public SqlErrorCollection Errors
{
get
{
if (this._errors == null)
this._errors = new SqlErrorCollection();
return this._errors;
}
}
static SqlException CreateException(SqlErrorCollection errorCollection, ...)
{
var stringBuilder = new StringBuilder();
for (int index = 0; index < errorCollection.Count; ++index)
{
if (index > 0) stringBuilder.Append(Environment.NewLine);
stringBuilder.Append(errorCollection[index].Message);
}
... ...
return new SqlException(((object) stringBuilder).ToString(), ...);
}
So please consider making OracleException's behavior to be consistent with that of SqlException. Note, if message concatenation will be implemented, that only distinct messages should be taken, in order to suppress duplicating messages for different data rows (like when multiple constraint checks fail upon closing OracleLoader).