Permalink
Browse files

silently fallback to non-native modules

  • Loading branch information...
einaros committed Apr 30, 2012
1 parent 12e52de commit 1eabfa852eaa79690e4bcc0e7a8925cfcbc6628f
Showing with 8 additions and 14 deletions.
  1. +4 −7 lib/BufferUtil.js
  2. +4 −7 lib/Validation.js
View
@@ -4,16 +4,13 @@
* MIT Licensed
*/
-/**
- * Node version 0.4 and 0.6 compatibility
- */
-
try {
module.exports = require('../build/Release/bufferutil');
} catch (e) { try {
module.exports = require('../build/default/bufferutil');
+} catch (e) { try {
+ module.exports = require('./BufferUtilWindows');
} catch (e) {
- console.error('bufferutil.node has either not been built (run make),');
- console.error('or your node install has changed architecture (run make clean && make).')
+ console.error('bufferutil.node seems to not have been built. Run npm install.');
throw e;
-}}
+}}}
View
@@ -4,16 +4,13 @@
* MIT Licensed
*/
-/**
- * Node version 0.4 and 0.6 compatibility
- */
-
try {
module.exports = require('../build/Release/validation');
} catch (e) { try {
module.exports = require('../build/default/validation');
+} catch (e) { try {
+ module.exports = require('./ValidationWindows');
} catch (e) {
- console.error('validation.node has either not been built (run make),');
- console.error('or your node install has changed architecture (run make clean && make).')
+ console.error('validation.node seems to not have been built. Run npm install.');
throw e;
-}}
+}}}

0 comments on commit 1eabfa8

Please sign in to comment.