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

Fix 'wired to None' error message #276

Merged
merged 1 commit into from Sep 7, 2018
Merged

Conversation

rsetaluri
Copy link
Collaborator

No description provided.

@@ -307,7 +307,8 @@ def is_clock_or_nested_clock(p):
if value is None and is_clock_or_nested_clock(port):
return
elif value is None:
raise Exception("Got None for port: {}, is it connected to anything?".format(port))
raise Exception(f"Got None for port '{port.debug_name}', is it "
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we should probably consolidate all error reporting in the backends. In some places we use Exceptions, in others error().

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you point to where we use error in the backend?

The idea was that error was used for things like wiring logic, which shouldn't terminate the program so you can see all the wiring errors. (like seeing multiple errors from a C compiler)

The backends throw exceptions because if it runs into an issue, it can't continue on (e.g. it can't compile anything), so the program should terminate.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1071

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 70.459%

Changes Missing Coverage Covered Lines Changed/Added Lines %
magma/backend/coreir_.py 0 1 0.0%
Totals Coverage Status
Change from base Build 1069: 0.0%
Covered Lines: 3344
Relevant Lines: 4746

💛 - Coveralls

@leonardt leonardt merged commit 301cc9d into master Sep 7, 2018
@leonardt leonardt deleted the none-wiring-error-msg branch September 7, 2018 02:21
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

3 participants