Check error codes of jvmti functions

Closes #24