From 7408921795ad708b6594b367b75584d3cd5dc137 Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Wed, 26 Jul 2017 15:22:44 -0600 Subject: [PATCH] fix assert messages that are not useful --- js/common/model/Atom.js | 2 +- js/common/view/PlateNode.js | 4 ++-- js/common/view/PolarityIndicator.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/common/model/Atom.js b/js/common/model/Atom.js index 45836c59..031f89fb 100644 --- a/js/common/model/Atom.js +++ b/js/common/model/Atom.js @@ -30,7 +30,7 @@ define( function( require ) { }, options ); assert && assert( MPConstants.ELECTRONEGATIVITY_RANGE.contains( options.electronegativity ), - 'invalid electronegativity: ' + options.electronegativity ); + 'electronegativity out of range: ' + options.electronegativity ); // @public (read-only) this.name = name; diff --git a/js/common/view/PlateNode.js b/js/common/view/PlateNode.js index eaafd131..dcd6daec 100644 --- a/js/common/view/PlateNode.js +++ b/js/common/view/PlateNode.js @@ -45,9 +45,9 @@ define( function( require ) { this.plateHeight = options.plateHeight; // @public used in view layout assert && assert ( options.polarity === 'negative' || options.polarity === 'positive' , - 'polarity must be "positive" or "negative"' ); + 'invalid polarity: ' + options.polarity ); assert && assert ( options.perspective === 'right' || options.perspective === 'left' , - 'perspective must be either "left" or "right"' ); + 'invalid perspective: ' + options.perspective ); Node.call( this ); diff --git a/js/common/view/PolarityIndicator.js b/js/common/view/PolarityIndicator.js index ef14542f..f394134b 100644 --- a/js/common/view/PolarityIndicator.js +++ b/js/common/view/PolarityIndicator.js @@ -30,7 +30,7 @@ define( function( require ) { }, options ); assert && assert ( options.polarity === 'negative' || options.polarity === 'positive' , - 'polarity must be "positive" or "negative"' ); + 'invalid polarity: ' + options.polarity ); Node.call( this );