Information and Warnings
Drivers can indicate Information and Warning states in addition to Error states
- Uses false-but-defined values of $h->err and $DBI::err
- Zero "0" indicates a "warning"
- Empty "" indicates "success with information" or other messages from database
Drivers should use $h->set_err(…) method to record info/warn/error states
- implements logic to correctly merge multiple info/warn/error states
- info/warn/error messages are appended to errstr with a newline
- $h->{ErrCount} attribute is incremented whenever an error is recorded
The $h->{HandleSetErr} attribute can be used to influence $h->set_err()
- A code reference that's called by set_err and can edit its parameters
- So can promote warnings/info to errors or demote/hide errors etc.
- Called at point of error from within driver, unlike $h->{HandleError}
The $h->{PrintWarn} attribute acts like $h->{PrintError} but for warnings