Skip to content

Added better error messages for assertion and ran auto code cleanup. #831

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

Merged
merged 4 commits into from
Mar 13, 2025

Conversation

ankushdesai
Copy link
Member

No description provided.

@ankushdesai ankushdesai enabled auto-merge (squash) March 11, 2025 23:49
@@ -148,19 +148,19 @@ private async Task CreateTaskFromProcess(Process proc)
switch (proc.ExitCode)
{
case 0:
Logger.WriteLine($"... Checker run finished.");
_logger.WriteLine("... Checker run finished.");
Copy link
Contributor

Choose a reason for hiding this comment

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

In future code, should we format all private fields to be: _fieldName?

@@ -534,12 +533,12 @@ protected StateMachineId CreateStateMachine(Type type, string name, Event initia
/// <param name="opGroupId">Optional id that can be used to identify this operation.</param>
public void SendEvent(PMachineValue target, Event ev)
{
Assert(ev != null, "Machine cannot send a null event");
Assert(target != null, "Machine in send cannot be null");
Assert(ev != null, $"Machine cannot send a null event. Machine {Id} trying to send null event in state {CurrentStateName}.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't think this assertion will ever be false. When I try to send a null event it gets caught by the compiler.

@ankushdesai ankushdesai merged commit 7d910aa into master Mar 13, 2025
8 checks passed
@ankushdesai ankushdesai deleted the update/error_messages branch March 13, 2025 20:48
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