PDI_errhandler can not be called before PDI_init so it always uses the default behaviour
PDI_errhandler
PDI_init