Added masks support in ErrorMap interface