case StoreException.OBJECT_EXISTS:
return new ObjectExistsException(msg);
case StoreException.OBJECT_NOT_FOUND:
return new ObjectNotFoundException(msg);
case StoreException.OPTIMISTIC:
return new OptimisticException(msg);
case StoreException.REFERENTIAL_INTEGRITY:
return new ReferentialIntegrityException(msg);
default:
return new StoreException(msg);
}