Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Exceptions while performing DB operation using Valchkou #64

Open
prabhabisht opened this issue Jul 24, 2015 · 4 comments
Open

Comments

@prabhabisht
Copy link

Hi Eugene,

What are the possible exceptions at the time of performing get,save,delete ,updatevalue etc function using valchkou, I need to do some special handling(raise event or some alarm etc). I assumed that it will raise only Driver Exception , but sometimes I am getting UncheckedExecutionException as well .
So can you tell me what are the other runtime exceptions Valchkou mapper throws so I can handle them accordingly.

@valchkou
Copy link
Owner

I don't have defined exceptions in my module. and you are correct, you can only code logic for datastax defined exceptions. If you see something else please report here and I will take a look

@vikbhati
Copy link

Hi Eugene,

We started with catching DriverException in all the methods as it covers most of the exception scenarios related to database.
But We got UncheckedExecutionException in one of the cases while performing a GET operation.
So we started catching generic exception also in all the methods.
Do you think catching driver Exception should suffice all the scenarios or we should catch the generic exception also?

@valchkou
Copy link
Owner

Hi,
What are those UncheckedExecutionExceptions? could you provide stacktrace please?
This is regular java program which can through any type of UncheckedExecutionException, like NullPointer. The question is why? if this happens because of your bug or data this is your decision how to handle it. But if this is bug in my module I will try to fix it shortly.

@SusilPanda
Copy link

Hi,
The exception I am getting while fetching employee details using get method.
Example : I have an employee column family
CF : Employee
emp_id emp_name emp_address
1234 abc India

Now I run the below query :
Employee employee = mapper.get(employeeDto);

Exception scenario : My CF has been dropped when I run the above query. In this case I expect the exception will be InvalidQueryException, but UncheckedExecutionExceptions is thrown.
com.google.common.util.concurrent.UncheckedExecutionException - com.datastax.driver.core.exceptions.InvalidQueryExceptions .

InvalidQueryExceptions is wrapped in the UncheckedExecutionException.

Is it clear now ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants