com.genexus.db.service.ServiceException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gxclassR Show documentation
Show all versions of gxclassR Show documentation
Core classes for the runtime used by Java and Android apps generated with GeneXus
package com.genexus.db.service;
import java.sql.SQLException;
public class ServiceException extends Error
{
private String sqlState;
private int vendorCode;
public ServiceException(String reason, String sqlState, int vendorCode)
{
this(reason, sqlState, vendorCode, null);
}
public ServiceException(String reason, String sqlState, int vendorCode, Throwable innerException)
{
super(reason, innerException);
this.sqlState = sqlState;
this.vendorCode = vendorCode;
}
public static SQLException createSQLException(ServiceError serviceError, Throwable e)
{
return new SQLException(createServiceException(serviceError, e));
}
public String getSQLState()
{
return sqlState;
}
public int getVendorCode()
{
return vendorCode;
}
public static ServiceException createServiceException(ServiceError serviceError)
{
return new ServiceException(serviceError.toString(), serviceError.getSqlState(), serviceError.getCode());
}
public static ServiceException createServiceException(ServiceError serviceError, Throwable innerException)
{
return new ServiceException(serviceError.toString(), serviceError.getSqlState(), serviceError.getCode(), innerException);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy