It is not OK to break the law to catch criminals, judge rules