Skip to content

Added a more descriptive error message in the app boostrap.#450

Merged
atanasovg merged 2 commits intoNativeScript:masterfrom
skarlatov:BootstrapErrorMessage
Jun 7, 2016
Merged

Added a more descriptive error message in the app boostrap.#450
atanasovg merged 2 commits intoNativeScript:masterfrom
skarlatov:BootstrapErrorMessage

Conversation

@skarlatov
Copy link
Copy Markdown
Contributor

Before this change the exception that was displayed by the run-time was too specific, lacking any meaningful information to the developer. If there was problem with the app main file the exception was:
"Failed to find module: ./, relative to: /".

Now the error message is:
"Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists. If using typescript make sure your entry point file is transpiled to javascript."

@ns-bot
Copy link
Copy Markdown

ns-bot commented May 11, 2016

💚

@atanasovg
Copy link
Copy Markdown
Contributor

👍 ping @Plamen5kov

@Plamen5kov
Copy link
Copy Markdown
Contributor

@skarlatov, tested the PR, and you have my 👍 after small format fix I commented on.

Comment thread src/src/com/tns/Module.java Outdated
if (!bootstrapFile.exists())
{
bootstrapFile = resolvePathHelper("./bootstrap", "");
String notFoundMessage = "Application entry point file not found. Please specify the file in package.json otherwise make sure the file index.js or bootstrap.js exists. \\n If using typescript make sure your entry point file is transpiled to javascript.";
Copy link
Copy Markdown
Contributor

@Plamen5kov Plamen5kov May 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change "\n If using...", to "\nIf using..."

@atanasovg atanasovg merged commit c4e024f into NativeScript:master Jun 7, 2016
@petekanev petekanev added this to the 2.1 milestone Jun 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants