Skip to content

Commit

Permalink
Fix report issue from jiahansu/GazeJS#5
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahansu committed Feb 6, 2018
1 parent d08f6c4 commit 15a76ad
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ win32_x64
win32_ia32
lib/bridjs/win32_x64
node_modules
package-lock.json
dyncall
build
*~
Expand Down
6 changes: 4 additions & 2 deletions lib/bridjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
require("log4js").getLogger().level = "info";

var my = require('myclass'), BridjsException = require("./bridjs_exception"),
CallbackWrapper = require("./callback_wrapper"),
FunctionCallbackWrapper = require("./function_callback_wrapper"),
Expand Down Expand Up @@ -114,7 +116,7 @@ if (bridjs) {
r = wrapReturn(callMethod.call(nativeFunction, klass._bridjs_impl_vm,
arguments));
} catch (e) {
throw new Error(e);
throw new BridjsException("Fail to invoke function "+name+":\n"+e);
}

return r;
Expand Down Expand Up @@ -343,7 +345,7 @@ if (bridjs) {
}
},
defineModule: function(properties, libraryPath, config) {
var klass = my.Class(properties);
var klass;

if(properties instanceof Array){
klass = my.Class(properties[0], properties[1]);
Expand Down
15 changes: 5 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridjs",
"version": "0.5.6",
"version": "0.5.8",
"description": "V8 bindings for dyncall, and BridJ-like API for nodejs.",
"keywords": [
"dyncall",
Expand Down Expand Up @@ -31,18 +31,13 @@
"lib": "lib"
},
"dependencies": {
"amdefine": "^1.0.1",
"log4js": "^2.5.2",
"myclass": ">=1.0.2",
"log4js": ">=0.6.9",
"amdefine": ">=1.0.0",
"xregexp" : "3.1.1",
"nan" : ">=2.4.0"
"nan": "^2.8.0",
"xregexp": "3.1.1"
},
"devDependencies": {
"myclass": ">=1.0.2",
"log4js": ">=0.6.9",
"amdefine": ">=1.0.0",
"xregexp" : "3.1.1",
"nan" : ">=2.4.0"
},
"browser": {
"os": false
Expand Down
2 changes: 2 additions & 0 deletions test/bridjs_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
var assert = require('assert'), bridjs = require('../lib/bridjs.js'), log4js = require("log4js"),
Utils = require("../lib/utils.js"), my = require('myclass'), Compiler = require("../lib/compiler");
var log = log4js.getLogger("BridjsTest"), libPath;

log.level = "info";
/*
var interval = setInterval(function() {
log.info("keep test alive");
Expand Down

0 comments on commit 15a76ad

Please sign in to comment.