Requesting image search outside of screen boundaries fails with runtime error #195
Description
Version
1.5.0
Description
When I accidentally fed screen.find()
a search region outside the screen's boundaries, the process terminated with a cryptic runtime error like that:
terminate called after throwing an instance of 'std::runtime_error'
what(): OpenCV Error: (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, in file /node_modules/opencv-build/opencv/opencv/modules/core/src/matrix.cpp, line 473, status -215
Aborted (core dumped)
A promise rejection would seem preferable.