*
* @author Brinda Santh
*/
-open class BlueprintProcessorException : ErrorCatalogException, ErrorCatalogExceptionFluent<BlueprintProcessorException> {
+open class BluePrintProcessorException : ErrorCatalogException, ErrorCatalogExceptionFluent<BluePrintProcessorException> {
constructor(message: String, cause: Throwable) : super(message, cause)
constructor(message: String) : super(message)
constructor(code: Int, message: String) : super(code, message)
constructor(code: Int, message: String, cause: Throwable) : super(code, message, cause)
- override fun code(code: Int): BlueprintProcessorException {
+ override fun code(code: Int): BluePrintProcessorException {
return this.updateCode(code)
}
- override fun domain(domain: String): BlueprintProcessorException {
+ override fun domain(domain: String): BluePrintProcessorException {
return this.updateDomain(domain)
}
- override fun action(action: String): BlueprintProcessorException {
+ override fun action(action: String): BluePrintProcessorException {
return this.updateAction(action)
}
- override fun http(type: String): BlueprintProcessorException {
+ override fun http(type: String): BluePrintProcessorException {
return this.updateHttp(type)
}
- override fun grpc(type: String): BlueprintProcessorException {
+ override fun grpc(type: String): BluePrintProcessorException {
return this.updateGrpc(type)
}
- override fun convertToHttp(): BlueprintProcessorException {
+ override fun convertToHttp(): BluePrintProcessorException {
return this.inverseToHttp()
}
- override fun convertToGrpc(): BlueprintProcessorException {
+ override fun convertToGrpc(): BluePrintProcessorException {
return this.inverseToHttp()
}
- override fun payloadMessage(message: String): BlueprintProcessorException {
+ override fun payloadMessage(message: String): BluePrintProcessorException {
return this.updatePayloadMessage(message)
}
- override fun addErrorPayloadMessage(message: String): BlueprintProcessorException {
+ override fun addErrorPayloadMessage(message: String): BluePrintProcessorException {
return this.updateErrorPayloadMessage(message)
}
- override fun addSubError(errorMessage: ErrorMessage): BlueprintProcessorException {
+ override fun addSubError(errorMessage: ErrorMessage): BluePrintProcessorException {
return this.updateSubError(errorMessage)
}
}
-class BlueprintRetryException : RuntimeException {
+class BluePrintRetryException : RuntimeException {
constructor(message: String, cause: Throwable) : super(message, cause)
constructor(message: String) : super(message)
constructor(cause: Throwable) : super(cause)
/** Extension Functions */
-fun processorException(message: String): BlueprintProcessorException {
- return BlueprintProcessorException(message)
+fun processorException(message: String): BluePrintProcessorException {
+ return BluePrintProcessorException(message)
}
-fun processorException(message: String, cause: Throwable): BlueprintProcessorException {
- return BlueprintProcessorException(message, cause)
+fun processorException(message: String, cause: Throwable): BluePrintProcessorException {
+ return BluePrintProcessorException(message, cause)
}
-fun processorException(cause: Throwable, message: String, vararg args: Any?): BlueprintProcessorException {
- return BlueprintProcessorException(cause, message, args)
+fun processorException(cause: Throwable, message: String, vararg args: Any?): BluePrintProcessorException {
+ return BluePrintProcessorException(cause, message, args)
}
-fun processorException(code: Int, message: String): BlueprintProcessorException {
+fun processorException(code: Int, message: String): BluePrintProcessorException {
return processorException(message).code(code)
}
-fun processorException(code: Int, message: String, cause: Throwable): BlueprintProcessorException {
+fun processorException(code: Int, message: String, cause: Throwable): BluePrintProcessorException {
return processorException(message, cause).code(code)
}
-fun processorException(code: Int, cause: Throwable, message: String, vararg args: Any?): BlueprintProcessorException {
+fun processorException(code: Int, cause: Throwable, message: String, vararg args: Any?): BluePrintProcessorException {
return processorException(cause, message, args).code(code)
}
-fun httpProcessorException(type: String, message: String): BlueprintProcessorException {
+fun httpProcessorException(type: String, message: String): BluePrintProcessorException {
return processorException(message).http(type)
}
-fun grpcProcessorException(type: String, message: String): BlueprintProcessorException {
+fun grpcProcessorException(type: String, message: String): BluePrintProcessorException {
return processorException(message).grpc(type)
}
-fun httpProcessorException(type: String, domain: String, message: String): BlueprintProcessorException {
+fun httpProcessorException(type: String, domain: String, message: String): BluePrintProcessorException {
val bluePrintProcessorException = processorException(message).http(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message)
}
-fun grpcProcessorException(type: String, domain: String, message: String): BlueprintProcessorException {
+fun grpcProcessorException(type: String, domain: String, message: String): BluePrintProcessorException {
val bluePrintProcessorException = processorException(message).grpc(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message)
}
fun httpProcessorException(type: String, domain: String, message: String, cause: Throwable):
- BlueprintProcessorException {
+ BluePrintProcessorException {
val bluePrintProcessorException = processorException(message, cause).http(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message, ExceptionUtils.getRootCauseMessage(cause))
}
fun grpcProcessorException(type: String, domain: String, message: String, cause: Throwable):
- BlueprintProcessorException {
+ BluePrintProcessorException {
val bluePrintProcessorException = processorException(message, cause).grpc(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message, ExceptionUtils.getRootCauseMessage(cause))
}
fun httpProcessorException(type: String, domain: String, message: String, cause: Throwable, vararg args: Any?):
- BlueprintProcessorException {
+ BluePrintProcessorException {
val bluePrintProcessorException = processorException(cause, message, args).http(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message, ExceptionUtils.getRootCauseMessage(cause))
}
fun grpcProcessorException(type: String, domain: String, message: String, cause: Throwable, vararg args: Any?):
- BlueprintProcessorException {
+ BluePrintProcessorException {
val bluePrintProcessorException = processorException(cause, message, args).grpc(type)
return bluePrintProcessorException.addDomainAndErrorMessage(domain, message, ExceptionUtils.getRootCauseMessage(cause))
}
-fun BlueprintProcessorException.updateErrorMessage(domain: String, message: String, cause: String):
- BlueprintProcessorException {
+fun BluePrintProcessorException.updateErrorMessage(domain: String, message: String, cause: String):
+ BluePrintProcessorException {
return this.addDomainAndErrorMessage(domain, message, cause).domain(domain)
.addErrorPayloadMessage(message)
.payloadMessage(message)
}
-fun BlueprintProcessorException.updateErrorMessage(domain: String, message: String): BlueprintProcessorException {
+fun BluePrintProcessorException.updateErrorMessage(domain: String, message: String): BluePrintProcessorException {
return this.addDomainAndErrorMessage(domain, message).domain(domain)
.addErrorPayloadMessage(message)
.payloadMessage(message)
}
-private fun BlueprintProcessorException.addDomainAndErrorMessage(
+private fun BluePrintProcessorException.addDomainAndErrorMessage(
domain: String,
message: String,
cause: String = ""
-): BlueprintProcessorException {
+): BluePrintProcessorException {
return this.addSubError(ErrorMessage(domain, message, cause)).domain(domain)
}