Error handling in Rascal API.