@@ -25,25 +25,22 @@ if ( Math.sign === undefined ) {
}
-THREE.ExceptionErrorHandler = function( message, optionalData ) {
- console.error( message );
- if( optionalData ) console.error( optionalData );
+THREE.ExceptionErrorHandler = function( message ) {
+ console.error( arguments );
var error = new Error( message );
- error.optionalData = optionalData;
+ error.optionalData = arguments;
throw error;
};
-THREE.ConsoleErrorHandler = function( message, optionalData ) {
+THREE.ConsoleErrorHandler = function() {
-THREE.ConsoleWarningHandler = function( message, optionalData ) {
- console.warn( message );
- if( optionalData ) console.warn( optionalData );
+THREE.ConsoleWarningHandler = function() {
+ console.warn( arguments );
-THREE.NullHandler = function( message, optionalData ) {
+THREE.NullHandler = function() {
// set the default error handlers
@@ -314,7 +314,7 @@ THREE.Object3D.prototype = {
if ( object === this ) {
- THREE.error( "THREE.Object3D.add:", object, "can't be added as a child of itself." );
+ THREE.error( "THREE.Object3D.add: object can't be added as a child of itself.", object );
return this;
@@ -334,7 +334,7 @@ THREE.Object3D.prototype = {
} else {
- THREE.error( "THREE.Object3D.add:", object, "is not an instance of THREE.Object3D." );
+ THREE.error( "THREE.Object3D.add: object not an instance of THREE.Object3D.", object );
@@ -5821,7 +5821,7 @@ THREE.WebGLRenderer = function ( parameters ) {
var context = canvas.getContext( '2d' );
context.drawImage( image, 0, 0, image.width, image.height, 0, 0, canvas.width, canvas.height );
- THREE.warning( 'THREE.WebGLRenderer:' + image + 'is too big (' + image.width + 'x' + image.height + '). Resized to ' + canvas.width + 'x' + canvas.height + '.' );
+ THREE.warning( 'THREE.WebGLRenderer: image is too big (' + image.width + 'x' + image.height + '). Resized to ' + canvas.width + 'x' + canvas.height, image );
return canvas;
@@ -338,16 +338,13 @@ THREE.WebGLProgram = ( function () {
if ( _gl.getProgramParameter( program, _gl.LINK_STATUS ) === false ) {
- THREE.error( 'THREE.WebGLProgram: shader error: ' + _gl.getError(), {
- 'gl.VALIDATE_STATUS': _gl.getProgramParameter( program, _gl.VALIDATE_STATUS ),
- 'gl.getPRogramInfoLog': programLogInfo
- });
+ THREE.error( 'THREE.WebGLProgram: shader error: ' + _gl.getError(), 'gl.VALIDATE_STATUS', _gl.getProgramParameter( program, _gl.VALIDATE_STATUS ), 'gl.getPRogramInfoLog', programLogInfo );
if ( programLogInfo !== '' ) {
- THREE.warning( 'THREE.WebGLProgram: gl.getProgramInfoLog()', programLogInfo );
+ THREE.warning( 'THREE.WebGLProgram: gl.getProgramInfoLog()' + programLogInfo );
// THREE.warning( _gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( glVertexShader ) );
// THREE.warning( _gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( glFragmentShader ) );
@@ -29,8 +29,7 @@ THREE.WebGLShader = ( function () {
if ( gl.getShaderInfoLog( shader ) !== '' ) {
- THREE.warning( 'THREE.WebGLShader: gl.getShaderInfoLog()', gl.getShaderInfoLog( shader ) );
- THREE.warning( addLineNumbers( string ) );
+ THREE.warning( 'THREE.WebGLShader: gl.getShaderInfoLog()', gl.getShaderInfoLog( shader ), addLineNumbers( string ) );