Seems like throwing an exception would be more appropriate. Any particular reason you opted for a warning?