I'm currently learning functional languages and have only limited knowledge, but from what I've read now you are right.
Throwing exceptions is pure, but catching them is impure.
In this case I guess the printLine function can throw an exception therefore the calling function must be declared with Exception?