{"category":{"__v":2,"_id":"566e55c12c1e760d0030c56d","pages":["566e55c12c1e760d0030c56e","566e55c12c1e760d0030c56f","566e55c12c1e760d0030c570","566e55c12c1e760d0030c571","566e55c12c1e760d0030c572","566e55c12c1e760d0030c573","566e55c12c1e760d0030c574","566e55c12c1e760d0030c575","566e55c12c1e760d0030c576","566e55c12c1e760d0030c577","566e55c12c1e760d0030c578","566e55c12c1e760d0030c579","566e55c12c1e760d0030c57a","566e55c12c1e760d0030c57b","566e55c12c1e760d0030c57c","566e55c12c1e760d0030c57d","566e55c12c1e760d0030c57e","566e55c12c1e760d0030c57f","566e55c12c1e760d0030c580","566e55c12c1e760d0030c581","566e55c12c1e760d0030c582","566e55c12c1e760d0030c583","566e55c12c1e760d0030c584","566e55c12c1e760d0030c585","566e55c12c1e760d0030c586","566e55c12c1e760d0030c587","566e55c12c1e760d0030c588","566e5640c15c8f0d000ee863"],"project":"54408e54309354080070a896","version":"566e55c02c1e760d0030c56c","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-17T03:34:44.886Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"project":"54408e54309354080070a896","user":"544083bee239230800071bef","version":{"__v":1,"_id":"566e55c02c1e760d0030c56c","project":"54408e54309354080070a896","createdAt":"2015-12-14T05:38:08.400Z","releaseDate":"2015-12-14T05:38:08.400Z","categories":["566e55c12c1e760d0030c56d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.2.3","version":"1.2.3"},"_id":"566e55c12c1e760d0030c578","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-25T22:05:10.094Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"never","params":[],"url":""},"isReference":false,"order":10,"body":"#  Error processing\nJulia exceptions are detected when they occur and are propagated to the JavaScript runtime.   Also, there are fairly few error that can occur before control is handed over to Julia; these errors are also propagated.  All three execution type primitives **eval**, **exec** as well as **Script.exec** share this same behavior.\n\n# Error Messages\nDuring an asynchronous call, Julia exceptions and node-julia exceptions are propagated to JavaScript via error message.  These are simply the message strings relevant to the error.  If no error occurs, then **null** is returned.\n\n* *julia*.*func*(*arguments*,function(*err*,*result1*,*result2*...) {  // <--- err will be non-null if an error occurs\n\n# Exceptions\nDuring a synchronous call, Julia exceptions are caught and then re-thrown as JavaScript exceptions.  There is currently a somewhat simplistic mapping in place to relate similar type exceptions. If a Julia exception is caught that does not have a translation, the catchall is a generic Javascript error.\n\n## An unknown method\n\n    julia.exec('foo',1,2,3);\n      ^\n    ReferenceError: Julia method foo is undefined\n        at ReferenceError (native)\n        at Object.<anonymous> (/Users/jeffw/src/nj-test3/test3.js:5:7)\n        at Module._compile (module.js:449:26)\n        at Object.Module._extensions..js (module.js:467:10)\n        at Module.load (module.js:349:32)\n        at Function.Module._load (module.js:305:12)\n        at Function.Module.runMain (module.js:490:10)\n        at startup (node.js:124:16)\n        at node.js:807:3\n\n## By comparison a known function, but invoked with the wrong arguments\n\n    julia.exec('inv',1,2,3);\n      ^\n    ReferenceError: Julia unmatched method inv(Int64,Int64,Int64)\n        at ReferenceError (native)\n\n## A general error\n\n    julia.eval('(*!:::at:::&$(*&@$*(!@&$(*&@');\n      ^\n    Error: Julia syntax: missing separator in tuple\n        at Error (native)","excerpt":"","slug":"error-conditions","type":"basic","title":"Error Conditions"}
# Error processing Julia exceptions are detected when they occur and are propagated to the JavaScript runtime. Also, there are fairly few error that can occur before control is handed over to Julia; these errors are also propagated. All three execution type primitives **eval**, **exec** as well as **Script.exec** share this same behavior. # Error Messages During an asynchronous call, Julia exceptions and node-julia exceptions are propagated to JavaScript via error message. These are simply the message strings relevant to the error. If no error occurs, then **null** is returned. * *julia*.*func*(*arguments*,function(*err*,*result1*,*result2*...) { // <--- err will be non-null if an error occurs # Exceptions During a synchronous call, Julia exceptions are caught and then re-thrown as JavaScript exceptions. There is currently a somewhat simplistic mapping in place to relate similar type exceptions. If a Julia exception is caught that does not have a translation, the catchall is a generic Javascript error. ## An unknown method julia.exec('foo',1,2,3); ^ ReferenceError: Julia method foo is undefined at ReferenceError (native) at Object.<anonymous> (/Users/jeffw/src/nj-test3/test3.js:5:7) at Module._compile (module.js:449:26) at Object.Module._extensions..js (module.js:467:10) at Module.load (module.js:349:32) at Function.Module._load (module.js:305:12) at Function.Module.runMain (module.js:490:10) at startup (node.js:124:16) at node.js:807:3 ## By comparison a known function, but invoked with the wrong arguments julia.exec('inv',1,2,3); ^ ReferenceError: Julia unmatched method inv(Int64,Int64,Int64) at ReferenceError (native) ## A general error julia.eval('(*!@&$(*&@$*(!@&$(*&@'); ^ Error: Julia syntax: missing separator in tuple at Error (native)