Comments (6)
I'm not sure I follow. What is happening and what should be happening?
from arangojs.
In node, exceptions in asynchronous code is typically bubbling up to the nearest exception handler. If there isn't a handler, the node process prints detailed information about the exception before terminating.
It seems that something in this adapter is wrapping callbacks in an exception handler. I expect my little example to terminate with a ReferenceError: programmer is not defined
, but it doesn't. My callback is just ending quietly and the process continuous to run.
from arangojs.
Over the weekend, I've refactored my code from callbacks to promises, which are behaving correctly. So I'm not affected by this exceptions-in-callbacks-incorrectly-being-caught issue anymore.
from arangojs.
Which JS environment are you using? I'm guessing this problem occurs when promises are supported (e.g. latest Chrome or node 0.12) and you're using the errbacks instead.
Basically, the errback will be invoked in the promise's then
method. Exceptions in that method will result in the promise returned by that method to be rejected but nothing else. As the promise is silently discarded, the error simply vanishes.
from arangojs.
I've adjusted the logic so the errback is invoked outside the promise logic. This should give you the behaviour you're expecting.
from arangojs.
iojs v2.2.1
from arangojs.
Related Issues (20)
- Invalid token while loading arangojs module in nodejs - collection.js, cursor.js, and graph.js - syntax error HOT 2
- Replace XHR with Fetch HOT 1
- How to use "ForceOneShardAttributeValue" option in aqlQuery? HOT 3
- Better handling of arangojs' connection pool to avoid "socket hang up?" HOT 2
- Update driver Version in Tutorial
- db.exists() no longer a function? HOT 3
- collection.document failing with options HOT 2
- Infinite loop in connection.js:177 HOT 3
- connect ECONNREFUSED error HOT 1
- Type issue after updating to v8.4.0 HOT 3
- Are there any code examples demonstrating how to include AQL queries in a stream transaction? HOT 2
- Getting error "expecting POST /_api/cursor" from Arangojs HOT 14
- Jest detecting open handles HOT 3
- outEdges and inEdges not working HOT 2
- Getting error "expecting POST /_api/cursor" HOT 1
- Documentation is unclear about when actual server connection occurs HOT 2
- Rollup Error: Could not resolve "./analyzer" from "./analyzer?commonjs-external" HOT 1
- Separate Typescript definitions of a Collection's Documents, vs the object passed to the save function
- Nesting of AQL literal does not work HOT 2
- Link to documentation is down
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arangojs.