Skip to content

Requesting image search outside of screen boundaries fails with runtime error #195

Description

@dancesWithBugs

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement to existing features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions