EZP-21719: implemented Depth criterion
Updated: more precise exception message