[TIMOB-3162] Android: Ti.API.log doesn't work with one argument only
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-04-03T18:51:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 2.1.0, Sprint 2012-07 |
Components | Android |
Labels | core, parity, qe-closed-3.2.0 |
Reporter | StudioHitori |
Assignee | Chase Culpepper |
Created | 2011-04-15T03:38:25.000+0000 |
Updated | 2014-01-06T11:27:21.000+0000 |
Description
I used Ti.API.log with one argument in an external JS file wrongly. It works on iPhone and a message is printed as info log. But on Android, it fails without error message and scripts after the log line are not executed.
Attachments
File | Date | Size |
---|---|---|
log single argument android runtime error.png | 2011-11-23T15:43:45.000+0000 | 71529 |
Bug still valid, verified on: SDK: 1.8.0.1.v20111123144258 Studio: 1.0.7.201111221758 OS: OS X Lion Devices: all supported Android devices and emulators Comments: When log is called with one argument on iOS platforms, the error type defaults to INFO, and the message prints correctly. On Android platforms, a runtime error is thrown (screenshot attached). The documentation may need to be updated as well, as log should take two arguments (severity, message).
I could not reproduce this runtime error in 1.8.0.1 or 2.0.2. The message was correctly logged to the console as undefined when using code:
Console:
SDK: 1.8.0.1, 2.0.2.v20120418121806 Runtime: V8 Studio: 2.0.2.201204171552 OS: Snow Leopard Devices Tested: Android Emulator 2.3.3
Appc-Studio: 3.2.0.201312191455 Sdk:3.2.0.GA acs:1.0.11 alloy:1.3.1-beta npm:1.3.2 titanium:3.2.0 titanium-code-processor:1.1.0 Osx: Maverick 10.9 Xcode: xCode 5.0.2 Device: HTC Desire(v4.0.3) and iPHONE Simulator(v7.0.3) Ti.API.log works for both one and more than one argument. Verified and closed