Dealing with deadlines

I usually like to ask the following question when I’m interviewing developers:
Imagine that you have a task that you estimated to be 2 weeks. It’s now two weeks from the deadline and you realise that you’ve made a mistake and that the task will take 3 weeks to do. What do you do?
The question is vague on purpose and usually shows how mature the developer is.
