[ticket/12273] Add file line to exception message

PHPBB3-12273
[ticket/12273] Remove duplicated code

PHPBB3-12273