more programmer friendly error handling (no alert)