The PrinterDriverClientException class defines a Code property that is helpful to determine the cause of an error.
Default messages are implemented for each Code, you can however modify any message through the GetCodeMessage and SetCodeMessage methods.
Refer to PrinterInstaller.SetPrinterConnectionDll example.