[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58441] trunk/blender/source/gameengine/ GameLogic/SCA_JoystickSensor.cpp: Changing the python error when accessing SCA_JoystickSensor. axisSingle in the wrong mode to an AttributeError instead of a TypeError as this more accurately reflects the problem .

Daniel Stokes kupomail at gmail.com
Sat Jul 20 05:16:01 CEST 2013


Revision: 58441
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58441
Author:   kupoman
Date:     2013-07-20 03:15:57 +0000 (Sat, 20 Jul 2013)
Log Message:
-----------
Changing the python error when accessing SCA_JoystickSensor.axisSingle in the wrong mode to an AttributeError instead of a TypeError as this more accurately reflects the problem.

Modified Paths:
--------------
    trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp

Modified: trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp	2013-07-20 03:01:50 UTC (rev 58440)
+++ trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp	2013-07-20 03:15:57 UTC (rev 58441)
@@ -367,7 +367,7 @@
 	SCA_Joystick *joy = ((SCA_JoystickManager *)self->m_eventmgr)->GetJoystickDevice(self->m_joyindex);
 	
 	if (self->m_joymode != KX_JOYSENSORMODE_AXIS_SINGLE) {
-		PyErr_SetString(PyExc_TypeError, "val = sensor.axisSingle: Joystick Sensor, not 'Single Axis' type");
+		PyErr_SetString(PyExc_AttributeError, "val = sensor.axisSingle: Joystick Sensor, not 'Single Axis' type");
 		return NULL;
 	}
 	




More information about the Bf-blender-cvs mailing list