Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24673] Android: Error thrown from require is an empty object

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2018-09-19T15:30:05.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterEwan Harris
AssigneeUnknown
Created2017-05-10T11:23:57.000+0000
Updated2018-09-19T15:30:05.000+0000

Description

Description

When performing a try catch on a require, if the module is not found then the error thrown will be an empty object, it should be a string like "Couldn't find module: /foo"

Steps to reproduce

Add the below to your app.js

Build for Android

try {
	require('/foo')
} catch(e) {
	console.log(e)
}

Actual

Empty object is returned as the error

Expected

Error should equal something like "Couldn't find module: /foo"

Comments

  1. Ewan Harris 2018-09-19

    Will be fixed by TIMOB-25899

JSON Source