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

Tween exception stack traces are not clickable #119

Open
noio opened this issue Oct 16, 2024 · 0 comments
Open

Tween exception stack traces are not clickable #119

noio opened this issue Oct 16, 2024 · 0 comments

Comments

@noio
Copy link

noio commented Oct 16, 2024

When an error occurs during a tween callback (such as when setting the value through from a Custom tween, or calling an onComplete), PrimeTween helpfully shows the stack trace up to that point, but it is not clickable.

And the log can be really dense.

Screenshot 2024-10-16 at 13 43 55

I think a simple Debug.LogException(e) should do it! It will then give the full stack trace of the code that caused the exception.

Somewhere in these lines:

try {
    _onValueChange(_target, val);
} catch (Exception e) {
    Assert.LogError($"Tween was stopped because of exception in {nameof(onValueChange)} callback, tween: {_tween.GetDescription()}, exception:\n{e}\n", _tween.id, _tween.target as UnityEngine.Object);
    _tween.EmergencyStop();
}

Note that I'm not talking about the "creation stack trace", which is also very handy! But honestly most of the time I just want to click into the valueChanged / onTweenComplete callback code that caused the exception in the first place.

Screenshot 2024-10-16 at 13 52 52

@noio noio changed the title [feature] Use LogException to make Tween exception stack traces clickable Tween exception stack traces are not clickable Oct 16, 2024
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

No branches or pull requests

1 participant