A default constructor of message and an optional reference.
const ApiException(this.message, {this.reference});