From dabef4ecf33a4138bc467539efc48da224cc8205 Mon Sep 17 00:00:00 2001 From: Luisav1 Date: Thu, 9 Jun 2022 16:09:46 -0600 Subject: [PATCH] Changed an error to an assertion that prints out the type of unexpected particle. See https://github.com/phetsims/build-a-nucleus/issues/18. --- js/model/ParticleAtom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/model/ParticleAtom.js b/js/model/ParticleAtom.js index adda1e1..a3cc18d 100644 --- a/js/model/ParticleAtom.js +++ b/js/model/ParticleAtom.js @@ -380,7 +380,7 @@ class ParticleAtom extends PhetioObject { } else { - throw new Error( 'Unexpected particle type.' ); + assert && assert( false, 'Unexpected particle type ' + particle.type ); } }