Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'return -code error ...' instead of 'error ...' #42

Merged
merged 1 commit into from Mar 3, 2020

Conversation

flopp
Copy link

@flopp flopp commented Mar 3, 2020

xdnd::GetDroppedData uses error to report back an exceptional situation: there's no common DND data type; this situation also occurs when dragging some object over a non-DND-aware widget within a Tk application => this error statement is called often in a normal application.

xdnd::GetDroppedData is used via xdnd::GetPositionData in a catch block within xdnd::HandleXdndPosition.

If your application uses a custom error handler by redefining error, those error calls end up in the custom error handler, although these are not really error situations, but normal behaviour.

=> It would be better to use return -code error ... in this case.

@petasis petasis merged commit d5bd99f into petasis:master Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants