public bool GetErrorNumber(out int errorNumber)
{
CheckContextInitialized();
// object can be inserted only when the context is stopped
if(_status != ContextStatus.Stopped) {
throw new Exception("Object can be inserted only when the context is stopped");
}
int result = NativeMethods.GetErrorNumber(_contextId, out errorNumber);
return ValidResult(result);
}