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

[Developers] Soften Assertion Checks for BlueprintCallable Functions #27

Open
GuyPaddock opened this issue Sep 3, 2022 · 0 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers tech debt

Comments

@GuyPaddock
Copy link
Contributor

As a Developer who is getting started with OpenPF2, I'd like it if the assertion checks in BlueprintCallable code were softer, so that if a blueprint becomes out-of-date or unintentionally passes-in a nullptr for a required parameter, I get an error message instead of Unreal Engine crashing.

Acceptance Criteria

Given I'm calling a BlueprintCallable function from a blueprint and I pass a null value into a required parameter:

  1. I'd expect either that the blueprint would not compile or that I'd get an error in the logs.
  2. I'd expect Unreal Engine not to crash.
  3. I'd expect the call to have no other side effects (i.e. it should return early upon detecting the missing parameter value).
@GuyPaddock GuyPaddock added enhancement New feature or request good first issue Good for newcomers tech debt labels Sep 3, 2022
GuyPaddock added a commit that referenced this issue Sep 13, 2022
Now, if a character has no queue component and we try to do things that
require it, we just log a warning or error instead of crashing.
GuyPaddock added a commit that referenced this issue Sep 13, 2022
Now, if a character has no queue component and we try to do things that
require it, we just log a warning or error instead of crashing.
GuyPaddock added a commit that referenced this issue Sep 24, 2022
Now, if a character has no queue component and we try to do things that
require it, we just log a warning or error instead of crashing.
GuyPaddock added a commit that referenced this issue Sep 24, 2022
This is only safe on arrays of compatible types.
GuyPaddock added a commit that referenced this issue Sep 25, 2022
Now, if a character has no queue component and we try to do things that
require it, we just log a warning or error instead of crashing.
GuyPaddock added a commit that referenced this issue Sep 25, 2022
Not exactly sure why these are NULL at the moment, but these methods are
callable from Blueprint so we need to handle this case.
GuyPaddock added a commit that referenced this issue Sep 25, 2022
Not exactly sure why these are NULL at the moment, but these methods are
callable from Blueprint so we need to handle these cases.
GuyPaddock added a commit that referenced this issue Sep 25, 2022
Not exactly sure why these are NULL at the moment, but these methods are
callable from Blueprint so we need to handle these cases.
GuyPaddock added a commit that referenced this issue Sep 25, 2022
The ASC or ability information might be NULL locally if it's for a
character that is owned by another client. These methods are also
Blueprint callable, so it's best to recover gracefully from NULL input
rather than using an assertion here.
GuyPaddock added a commit that referenced this issue Sep 25, 2022
The ASC or ability information might be NULL locally if it's for a
character that is owned by another client. These methods are also
Blueprint callable, so it's best to recover gracefully from NULL input
rather than using an assertion here.
@GuyPaddock GuyPaddock moved this to Todo in OpenPF2 Core MVP Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers tech debt
Projects
None yet
Development

No branches or pull requests

1 participant