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

Already on GitHub? Sign in to your account

Invalid exception class used by chdb constructor. #2

Closed
zyxist opened this Issue Jul 11, 2011 · 1 comment

Comments

Projects
None yet
2 participants

zyxist commented Jul 11, 2011

Currently, chdb throws "Exception" class object, when it cannot find the memory-mapped file. However, this exception is semantically incorrect in this place which forces us to wrap it in try{ }catch{} just to rewrite it into a different object, if our system relies on the exception types to decide what to do with them.

The valid exception is RuntimeException: http://docs.php.net/manual/en/class.runtimeexception.php

The change does not break the backward compatibility.

Owner

lcastelli commented Jul 26, 2011

Thanks, it looks like RuntimeException is indeed more correct.

I've pushed a patch that changes the exception type in RuntimeException in both the chdb constructor and in case of errors during chdb_create.

@lcastelli lcastelli closed this Jul 26, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment