Changed error generation to avoid try/catch to help simplify the life of developers