Standardise errors management using exceptions