Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Invalid exception class used by chdb constructor. #2

Closed
zyxist opened this Issue · 1 comment

2 participants

@zyxist

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.

@lcastelli
Owner

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.