From 782c61ecdb051490a28c325016bde99dc6416c19 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 19 Jul 2016 14:25:48 +0200 Subject: [PATCH] better error handling --- src/slicer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/slicer.js b/src/slicer.js index d9dd952..b9ba263 100644 --- a/src/slicer.js +++ b/src/slicer.js @@ -27,8 +27,7 @@ export default class extends EventDispatcher { } else if (geometry.type.endsWith('Geometry')) { geometry = geometry.clone(); } else { - console.warn('Geometry is not an instance of BufferGeometry or Geometry'); - return; + throw 'Geometry is not an instance of BufferGeometry or Geometry'; } if (matrix instanceof THREE.Matrix4) {