View Issue Details

IDProjectCategoryView StatusLast Update
0001191NoesisGUIUnitypublic2019-02-24 06:44
Reporternokola Assigned Tosfernandez  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Product Version2.0.2f2 
Target Version2.2.0Fixed in Version2.2.0b1 
Summary0001191: Improved error handling (code)
Description

Copied from http://www.noesisengine.com/forums/viewtopic.php?f=3&t=1228

I noticed that the default exception handling in Noesis Unity in NoesisError.cs do not give back stack trace into my code in the Check() function.
If I change SetPendingError(...) to this, I get much better stack traces:
Code: Select all
private static void SetPendingError(string desc)
{
throw new NoesisException(desc); <---------- new code
// old and obsolete code below:
// Do not overwrite if there is already an exception pending
if (_pendingError.Length == 0)
{
_pendingError = desc;
}
}
Example:
Before: stack trace AFTER the error actually happened
[Exception] NoesisException: Target not found
View.Noesis_ViewTouchDown() Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:370
View.TouchDown() Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:218
NoesisView.TouchDown() Assets/NoesisGUI/Plugins/NoesisView.cs:258
NoesisExtensions.PointerDown() Assets/XAMLs/FantasiaPhone/NoesisExtensions.cs:179
ImagePointerEvents.ProcessPendingInputEventsIfAny() Assets/Scripts/ImagePointerEvents.cs:238
ImagePointerEvents.Update() Assets/Scripts/ImagePointerEvents.cs:127

After updat: stack trace AS the error happens:
[Exception] NoesisException: Target not found
Storyboard.Stop() Assets/NoesisGUI/Plugins/API/Proxies/Storyboard.cs:138
StoryboardExtensions.StopStoryboard() Assets/XAMLs/FantasiaPhone/UnityShared/StoryboardExtensions.cs:53
TiltEffect.StopTiltReturnStoryboardAndCleanup() Assets/XAMLs/FantasiaPhone/UnityShared/TiltEffect.cs:567
TiltEffect.BeginTiltEffect() Assets/XAMLs/FantasiaPhone/UnityShared/TiltEffect.cs:354
TiltEffect.TryStartTiltEffect() Assets/XAMLs/FantasiaPhone/UnityShared/TiltEffect.cs:284
TiltEffect.TiltEffect_ManipulationStarted() Assets/XAMLs/FantasiaPhone/UnityShared/TiltEffect.cs:194
UIElement.RaiseManipulationStarted() Assets/NoesisGUI/Plugins/API/Proxies/UIElement.cs:1729
Debug.LogException()
Error.SetNativePendingError() Assets/NoesisGUI/Plugins/API/Core/NoesisError.cs:40
UIElement.RaiseManipulationStarted() Assets/NoesisGUI/Plugins/API/Proxies/UIElement.cs:1734
View.Noesis_View_TouchDown()
View.Noesis_ViewTouchDown() Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:370
View.TouchDown() Assets/NoesisGUI/Plugins/API/Core/NoesisView.cs:218
NoesisView.TouchDown() Assets/NoesisGUI/Plugins/NoesisView.cs:258
NoesisExtensions.PointerDown() Assets/XAMLs/FantasiaPhone/NoesisExtensions.cs:179
ImagePointerEvents.ProcessPendingInputEventsIfAny() Assets/Scripts/ImagePointerEvents.cs:238
ImagePointerEvents.Update() Assets/Scripts/ImagePointerEvents.cs:127

Notice the extra TiltEffect.* stack traces that are very valuable - point to the actual code triggering the error.
Is it possible to improve/change the error handling in future update of Noesis to support the current error's stack trace like above? or is there a reason not to?

Regardless, I'll be using the new code with the "throw ..." that happens just in time, much more useful. :)

Steps To Reproduce
  1. Throw Noesis-related error in Unity and observe call stack
PlatformAny

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2017-11-13 18:34 nokola New Issue
2017-11-14 15:57 jsantos Assigned To => jsantos
2017-11-14 15:57 jsantos Status new => assigned
2018-11-01 02:14 jsantos View Status public => private
2018-11-21 16:45 jsantos Assigned To jsantos => sfernandez
2018-11-21 16:45 jsantos Target Version => 2.2.0
2018-11-21 16:45 jsantos View Status private => public
2018-11-21 16:45 jsantos Platform => Any
2018-11-23 18:45 sfernandez Status assigned => resolved
2018-11-23 18:45 sfernandez Resolution open => fixed
2018-11-23 18:45 sfernandez Fixed in Version => 2.2.0b1
2019-02-24 06:44 nokola Status resolved => closed
2025-10-10 13:29 jsantos Category Unity3D => Unity