updated exceptions to include type