-
Notifications
You must be signed in to change notification settings - Fork 0
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
Include "nativeStack" key for native exceptions, include unit-test #2
base: TIMOB-26007
Are you sure you want to change the base?
Conversation
tests/Resources/ti.addontest.js
Outdated
ex.should.have.readOnlyProperty('stack').which.is.a.String; | ||
// has special "nativeStack" property for native stacktrace | ||
// TODO: Should we make this an array instead? | ||
ex.should.have.property('nativeStack').which.is.a.String; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make this array to make it easier to format to string on crash dialog. On Windows I am implementing it that way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having it look/feel similar to the standard stack
property makes sense though too.
I understand that an array would be easier to loop through and would avoid EOL differences, but originally I think the goal was to have a native equivalent of the js stack property which is a string (and on V8/Android actually has the type of Error and message prefixed ahead of the actual stacktrace)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The question really is how developers use it in production, and I think a common use-case is logging it to the console (if even used), so a String might be more convenient as well. But I understand @infosia that it feels "wrong" from a structural perspective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok makes sense, considering to align with stack
property, I'm ok with string.
* refactor: fix all warnings (except deprecations for now) * refactor: update Swift test module to Swift 5 * refactor: update Swift test module to Swift 5 #2 * refactor: update Swift module template to Swift 5 * fix: properly lint hooks, restore app.js * fix: fix eslint warnings * fix: fix eslint * fix linting issue * remove duplicate 'use strict' directive * remove duplicate hasProperty method declaration * fix: address couple more warnings
As per discussion in tidev#10022. We may want to change the unit-tests here as well, but need to adjust the message checks.