Error Handler

Starting with version 2.0, there is a simple error handler for configuring error levels and messages.

The error configurations can be configured in a PP table defined in Configuration Per Quote Type.

The default PP table for error handler named CPQ_Default_Error_Configuration will be used if the configuration is not specified on the quote type level.

image-20210507-035027.png

Usage

In your logic, you just need to throw an exception with the key configured in the PP table.

Then you can use the PP table to configure the level, error message, etc.

Groovy
def yourLogic(){
  try{
    // your logics
  }catch(e){
    api.throwException("ERROR_CONFIG_KEY")
  }
}