What exception type to throw for unrecognized ID paramater?
- by fearofawhackplanet
ITool GetTool(Guid tool)
{
if (tool = Hammer.Id)
return new Hammer();
else if (tool = Drill.Id)
return new Drill();
else
throw new ....?
}
What's the most appropriate exception type to throw here? NotSupportedException is the closest I've found but I don't think that's quite right.