The compiler complains about this code:
public OdbcVersion odbc_version { set { set_odbc_version_ (value); } }
private void set_odbc_version_ (OdbcVersion value) throws UnixOdbcError {
if (!succeeded (set_environment_attribute_real (handle, Attribute.ODBC_VERSION, (void *) value, 0))) {
throw new UnixOdbcError.SET_ENVIRONMENT_ATTRIBUTE ("Could not set environment attribute");
}
}
The message is:
/mnt/code/dbdiadesign/src/unixodbc.vala:65.42-65.66: warning: unhandled error `UnixOdbc.UnixOdbcError'
Where do I put the throws
clause in a property declaration?
You can't throw errors in property getters or setters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With