This should do what you want:
expect(() => operations.lookupOrderDetails(), throwsA(isA<MyCustErr>()));
if you just want to check for exception check this answer:
This should do what you want:
expect(() => operations.lookupOrderDetails(), throwsA(isA<MyCustErr>()));
if you just want to check for exception check this answer: