Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7165] When an app experiences a JavaScript crash, write a [FATAL] error to the log/console

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsTooling
Labelstbs-1.9.0
ReporterIngo Muschenetz
AssigneeIngo Muschenetz
Created2012-01-12T22:41:50.000+0000
Updated2015-04-13T20:10:06.000+0000

Description

During development, a Titanium mobile application might encounter a fatal error, such as a missing or malformed JavaScript file. Our goal is to alert the user in as informative way as possible where the issue is (and eventually suggest a fix). As a first step, when an application encounters such an error, we would like the app to write out a console message similar to: [FATAL] Error Description app://path/to/file.js:85 This would be similar (or identical to) similar messages written during debugging, with an ap-relative path to the file, and a line #. Once we have this message, we can tune Studio to look for it and act upon it.

Comments

  1. Ivan Skugor 2012-01-13

    Information on which line of code error occurred would be nice to have.
  2. Ingo Muschenetz 2012-01-13

    Thank you for reminding me. I had forgotten the line number as part of the message.
  3. Stephen Tramer 2012-01-13

    For both Android and iOS, this is only going to be available when the JS itself causes an issue, not when there's an internal error due to improper use of classes (we can't track line numbers there, or call back to the system to get the line number).
  4. Ingo Muschenetz 2012-01-13

    Will we know at least the file that caused the problem?
  5. Stephen Tramer 2012-01-13

    We might be able to track that information, but that could be tricky for things like cross-context callbacks on iOS.

JSON Source