From d8b3b4e4749995ad735513e2f60e719fba42a4da Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 15 Apr 2014 20:54:16 +0100 Subject: [PATCH] Improve missing JS engine error message --- Doc/Manual/Javascript.html | 7 ++++--- Source/Modules/javascript.cxx | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Doc/Manual/Javascript.html b/Doc/Manual/Javascript.html index 7acf37fe3..8d8f436ca 100644 --- a/Doc/Manual/Javascript.html +++ b/Doc/Manual/Javascript.html @@ -8,9 +8,10 @@

SWIG and Javascript

This chapter describes SWIG's support of Javascript. It does not cover SWIG basics, but only information that is specific to this module.

Overview

-

JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. Its arguably the most popular language for web development. Beyond of being a browser-based scripting language, with node.js Javascript has found its way to a backend development language, too.

-

Native Javascript extensions can be used for applications that embed a web-browser view or that embed a Javascript engine (such as node.js). Extending a general purpose web-browser is not possible as this would be severe security issue.

-

SWIG Javasript currently supports JavascriptCore, the Javascript engine used by Safari/Webkit, and v8, which is used by Chromium and node.js.

+

Javascript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. Its arguably the most popular language for web development. +Javascript has gone beyond being a browser-based scripting language and with node.js, it is also used as a backend development language.

+

Native Javascript extensions can be used for applications that embed a web-browser view or that embed a Javascript engine (such as node.js). Extending a general purpose web-browser is not possible as this would be a severe security issue.

+

SWIG Javascript currently supports JavascriptCore, the Javascript engine used by Safari/Webkit, and v8, which is used by Chromium and node.js.

WebKit is a modern browser implementation available as open-source which can be embedded into an application.

Preliminaries

Running SWIG

diff --git a/Source/Modules/javascript.cxx b/Source/Modules/javascript.cxx index eae594727..72dc5c210 100644 --- a/Source/Modules/javascript.cxx +++ b/Source/Modules/javascript.cxx @@ -551,7 +551,7 @@ void JAVASCRIPT::main(int argc, char *argv[]) { } default: { - Printf(stderr, "SWIG Javascript: Unknown emitter type.\n"); + Printf(stderr, "SWIG Javascript: Unknown emitter type. Please specify one of -jsc -v8 or -node.\n"); SWIG_exit(-1); break; }