Added new constructor to InvalidPatternException