Can you please turn this into proper exception throwing?