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

[WIP] Fix 4282 file dir conflict stacktrace #4284

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bdbaddog
Copy link
Contributor

Handle dir or file where file or dir expected better than just a long stack trace.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt (and read the README.rst)
  • I have updated the appropriate documentation

… format string. Created FileWhereDirectoryExpectedError and DirWhereFileExpectedError exceptions which are children of TypeError (The previous exception raised when there was a mismatch.
@bdbaddog bdbaddog requested a review from mwichmann December 20, 2022 22:19
return fmt % self.node_path


class DirWhereFileExpectedError(SCons.Errors.BuildError):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feels like a bit of overkill to define individual exceptions for this, but that's not a big deal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DirWhereFile and FileWhereDir result in different fixes/issues.. removing a file to put a dir is easy, but not vice versa.
Or at least that was the thought.

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.

2 participants