#include <MStatus.h>
This class facilitates API level error handling. It encapsulates the status code and the internal MAYA error code as return by API functions. The user can query, set, print the error code along with the error description.
affectsNode.cpp, animCubeNode.cpp, animExportUtil.cpp, animExportUtil.h, animFileExport.cpp, animFileUtils.cpp, animFileUtils.h, animImportExport.cpp, animImportExport.h, animInfoCmd.cpp, anisotropicShader.cpp, apiMeshCreator.cpp, apiMeshCreator.h, apiMeshData.cpp, apiMeshData.h, apiMeshShape.cpp, apiMeshShape.h, apiSimpleShape.cpp, apiSimpleShape.h, arcLenNode.cpp, asciiToBinary.cpp, AshliPluginMain.cpp, backfillShader.cpp, blindComplexDataCmd.cpp, blindDataMesh.cpp, blindDataMesh.h, blindDataPluginMain.cpp, blindDataShader.cpp, blindDataShader.h, blindDoubleDataCmd.cpp, blindShortDataCmd.cpp, brickShader.cpp, buildRotationNode.cpp, cellShader.cpp, cgfxAttrDef.cpp, cgfxFindImage.cpp, cgfxShaderCmd.cpp, cgfxShaderCmd.h, cgfxShaderNode.cpp, cgfxShaderNode.h, cgfxVector.cpp, cgfxVector.h, checkerShader.cpp, circleNode.cpp, cleanPerFaceAssignmentCmd.cpp, cleanPerFaceAssignmentCmd.h, cleanPerFaceAssignmentPluginMain.cpp, clearcoat.cpp, closestPointCmd.cpp, closestPointOnCurveCmd.cpp, closestPointOnCurveCmd.h, closestPointOnCurveNode.cpp, closestPointOnCurveNode.h, closestPointOnCurvePlugin.cpp, closestPointOnNurbsSurfaceCmd.cpp, closestPointOnNurbsSurfaceCmd.h, clothPaintAttrCmd.cpp, clothPaintAttrCmd.h, clusterWeightFunction.cpp, componentScaleManip.cpp, compositingShader.cpp, conditionTest.cpp, contrastShader.cpp, convertBumpCmd.cpp, convertEdgesToFacesCmd.cpp, convertVerticesToEdgesCmd.cpp, convertVerticesToFacesCmd.cpp, createClipCmd.cpp, curvedArrowsNode.cpp, customAttrManip.cpp, customImagePlane.cpp, cvColorNode.cpp, cvColorShader.cpp, cvExpandCmd.cpp, cvPosCmd.cpp, D3DResourceManager.cpp, D3DViewportRenderer.cpp, D3DViewportRenderer.h, D3DViewportRendererPlugin.cpp, dagMessageCmd.cpp, dagPoseInfoCmd.cpp, ddsFloatReader.cpp, deletedMsgCmd.cpp, depthShader.cpp, displacementShader.cpp, dynExprField.cpp, dynExprField.h, eventTest.cpp, exampleMRampAttribute.cpp, exportJointClusterDataCmd.cpp, exportSkinClusterDataCmd.cpp, fileIOMsgCmd.cpp, filteredAsciiFile.cpp, findFileTexturesCmd.cpp, findTexturesPerPolygonCmd.cpp, flameShader.cpp, flipUVCmd.cpp, flipUVCmd.h, flipUVMain.cpp, fluidInfoCmd.cpp, footPrintManip.cpp, footPrintNode.cpp, fullLoftNode.cpp, fxManagerCmd.cpp, fxManagerCmd.h, gammaShader.cpp, genericAttributeNode.cpp, geometryCacheConverter.cpp, geometryCacheFile.cpp, geometryCacheFile.h, geometrySurfaceConstraint.cpp, geometrySurfaceConstraint.h, geomShader.cpp, getAttrAffectsCmd.cpp, glExtensions.cpp, GLSLShaderNode.cpp, GLSLShaderNode.h, hairCollisionSolver.cpp, helix2Cmd.cpp, helixCmd.cpp, helixTool.cpp, helloCmd.cpp, helloWorld.cpp, helloWorldCmd.cpp, hlslPluginMain.cpp, hlslShader.cpp, hlslShader.h, hwAnisotropicShader_NV20.cpp, hwAnisotropicShader_NV20.h, hwColorPerVertexShader.cpp, hwDecalBumpShader_NV20.cpp, hwDecalBumpShader_NV20.h, hwManagedTextureShader.cpp, hwPhongShader.cpp, hwPhongShader.h, hwPhongShaderBehavior.cpp, hwPhongShaderBehavior.h, hwReflectBumpShader_NV20.cpp, hwReflectBumpShader_NV20.h, hwRefractReflectShader_NV20.cpp, hwRefractReflectShader_NV20.h, hwRenderPostEffect.cpp, hwToonShader_NV20.cpp, hwToonShader_NV20.h, hwUnlitShader.cpp, hwUnlitShader.h, iffInfoCmd.cpp, iffPixelCmd.cpp, iffPpmCmd.cpp, iffreader.cpp, iffreader.h, instanceCallbackCmd.cpp, instancerListCmd.cpp, interpShader.cpp, intersectCmd.cpp, intersectOnNurbsSurfaceCmd.cpp, intersectOnNurbsSurfaceCmd.h, jitterNode.cpp, jlcVcrDevice.cpp, lambertShader.cpp, lassoTool.cpp, latticeNoise.cpp, latticeNoise.h, latticeNoiseCmd.cpp, latticeNoiseNode.cpp, lavaShader.cpp, lepTranslator.cpp, lightShader.cpp, lineManip.cpp, lineManip.h, lineManipContainer.cpp, lineManipContainer.h, listLightLinksCmd.cpp, listPolyHolesCmd.cpp, lockEvent.cpp, marqueeTool.cpp, maTranslator.cpp, meshMapUtils.cpp, meshMapUtils.h, meshOpCmd.cpp, meshOpCmd.h, meshOpFty.h, meshOpFtyAction.cpp, meshOpMain.cpp, meshOpNode.cpp, meshOpNode.h, meshRemapCmd.cpp, meshRemapCmd.h, meshRemapTool.cpp, meshRemapTool.h, meshReorderCmd.cpp, meshReorderCmd.h, meshReorderPlugin.cpp, meshReorderTool.cpp, meshReorderTool.h, mixtureShader.cpp, motionPathCmd.cpp, motionTraceCmd.cpp, moveCurveCVsCmd.cpp, moveManip.cpp, moveNumericTool.cpp, moveTool.cpp, MTexture.cpp, multiCurveNode.cpp, narrowPolyViewer.cpp, narrowPolyViewer.h, narrowPolyViewerCmd.cpp, narrowPolyViewerCmd.h, narrowPolyViewerMain.cpp, nodeCreatedCBCmd.cpp, nodeCreatedCBCmd.h, nodeInfoCmd.cpp, nodeMessageCmd.cpp, NodeMonitor.cpp, NodeMonitor.h, noiseShader.cpp, objExport.cpp, offsetNode.cpp, OpenEXR.cpp, OpenGLViewportRenderer.cpp, OpenGLViewportRenderer.h, OpenGLViewportRendererPlugin.cpp, ownerEmitter.cpp, ownerEmitter.h, particleAttrNode.cpp, particleAttrNode.h, particleAttrNodeMain.cpp, particlePathsCmd.cpp, particleSystemInfoCmd.cpp, peltOverlapCmd.cpp, pfxInfoCmd.cpp, phongShader.cpp, pickCmd.cpp, pluginCallbacks.cpp, pluginMain.cpp, pnTrianglesNode.cpp, pnTrianglesNode.h, pointOnMeshCmd.cpp, pointOnMeshCmd.h, pointOnMeshInfoNode.cpp, pointOnMeshInfoNode.h, pointOnMeshInfoPlugin.cpp, pointOnSubdNode.cpp, pointOnSubdNode.h, polyExporter.cpp, polyExporter.h, polyMessageCmd.cpp, polyModifierCmd.cpp, polyModifierCmd.h, polyModifierFty.h, polyPrimitiveCmd.cpp, polyRawExporter.cpp, polyRawExporter.h, polyRawWriter.cpp, polyRawWriter.h, polyTrgNode.cpp, polyWriter.cpp, polyWriter.h, polyX3DExporter.cpp, polyX3DExporter.h, polyX3DWriter.cpp, polyX3DWriter.h, progressWindowCmd.cpp, quadricShape.cpp, readAndWrite.cpp, referenceQueryCmd.cpp, renderAccessNode.cpp, renderViewInteractiveRenderCmd.cpp, renderViewRenderCmd.cpp, renderViewRenderRegionCmd.cpp, rockingTransform.cpp, rockingTransform.h, rockingTransformCheck.cpp, rockingTransformCheck.h, rockingTransformCheckMain.cpp, rockingTransformMain.cpp, rotateManip.cpp, sampleCmd.cpp, sampleParticles.cpp, scanDagCmd.cpp, scanDagSyntax.cpp, ShadingConnection.cpp, shadowMatteShader.cpp, ShapeMonitor.cpp, shellNode.cpp, shiftNode.cpp, simpleEmitter.cpp, simpleEmitter.h, simpleFluidEmitter.cpp, simpleFluidEmitter.h, simpleImageFile.cpp, simpleLoftNode.cpp, simpleSolverNode.cpp, simpleSpring.cpp, simpleSpring.h, sineNode.cpp, slopeShader.cpp, slopeShaderBehavior.cpp, slopeShaderBehavior.h, slopeShaderNode.cpp, slopeShaderNode.h, solidCheckerShader.cpp, spiralAnimCurveCmd.cpp, splitUVCmd.cpp, splitUVCmd.h, splitUVFty.h, splitUVFtyAction.cpp, splitUVMain.cpp, splitUVNode.cpp, splitUVNode.h, squareScaleManip.cpp, squareScaleManip.h, squareScaleManipContext.cpp, squareScaleManipContext.h, stringFormatNode.cpp, surfaceBumpManip.cpp, surfaceCreate.cpp, surfaceCreateCmd.cpp, surfaceTwist.cpp, surfaceTwistCmd.cpp, sweptEmitter.cpp, sweptEmitter.h, swissArmyManip.cpp, testNobjectNode.cpp, testNobjectNode.h, testNucleusNode.cpp, testNucleusNode.h, threadTestCmd.cpp, threadTestWithLocksCmd.cpp, tiffFloatReader.cpp, torusField.cpp, torusField.h, transCircleNode.cpp, translateCmd.cpp, undoRedoMsgCmd.cpp, userMsgCmd.cpp, viewCallbackTest.cpp, viewCaptureCmd.cpp, volumeLightCmd.cpp, volumeShader.cpp, weightListNode.cpp, whatisCmd.cpp, XmlGeometryCache.cpp, yTwistNode.cpp, and zoomCameraCmd.cpp.
Public Types | |
enum | MStatusCode { kSuccess = 0, kFailure, kInsufficientMemory, kInvalidParameter, kLicenseFailure, kUnknownParameter, kNotImplemented, kNotFound, kEndOfFile } |
Available Status Codes. More... | |
Public Member Functions | |
MStatus () | |
MStatus (MStatusCode) | |
MStatus (const MStatus &) | |
MStatus & | operator= (const MStatus &rhs) |
bool | operator== (const MStatus &rhs) const |
bool | operator== (const MStatusCode rhs) const |
bool | operator!= (const MStatus &rhs) const |
bool | operator!= (const MStatusCode rhs) const |
bool | error () const |
void | clear () |
MStatusCode | statusCode () const |
MString | errorString () const |
void | perror (const char *) const |
void | perror (const MString &) const |
void | set (bool status, unsigned char statusCode, unsigned char internalStatusCode) |
Internal use only. | |
void | setSuccess () |
operator bool () const | |
NO SCRIPT SUPPORT. | |
Friends | |
OPENMAYA_EXPORT std::ostream & | operator<< (std::ostream &, MStatus &) |
NO SCRIPT SUPPORT. | |
OPENMAYA_EXPORT bool | operator== (const MStatus::MStatusCode code, const MStatus &status) |
NO SCRIPT SUPPORT. | |
OPENMAYA_EXPORT bool | operator!= (const MStatus::MStatusCode code, const MStatus &status) |
NO SCRIPT SUPPORT. |
enum MStatus::MStatusCode |
Available Status Codes.
kSuccess | The operation was successful. |
kFailure | The operation failed. |
kInsufficientMemory | The operation failed due to insufficient memory. |
kInvalidParameter | An invalid parameter was provided. |
kLicenseFailure | Application is not licensed for the attempted operation. |
kUnknownParameter | Returned by MPxNode::compute for unrecognised plugs. |
kNotImplemented | Not currently used. |
kNotFound | Not currently used. |
kEndOfFile | Not currently used. |
MStatus::MStatus | ( | ) | [inline] |
The default class constructor. It initializes the internal detailed status code to kSuccess.
MStatus::MStatus | ( | MStatus::MStatusCode | status | ) |
The constructor that takes a MStatus::MStatusCode. Initializes the internal detailed status code to status
[in] | status | The initial detailed status code. |
MStatus::MStatus | ( | const MStatus & | status | ) | [inline] |
bool MStatus::operator== | ( | const MStatus & | rhs | ) | const [inline] |
bool MStatus::operator== | ( | const MStatusCode | rhs | ) | const [inline] |
The equivalence operator that takes a MStatus::MStatusCode.
[in] | rhs | a MStatus::MStatusCode, e.g. MS::kSuccess. |
bool MStatus::operator!= | ( | const MStatus & | rhs | ) | const [inline] |
bool MStatus::operator!= | ( | const MStatusCode | rhs | ) | const [inline] |
The not equal operator that takes a MStatus::MStatusCode.
[in] | rhs | a MStatus::MStatusCode, e.g. MS::kSuccess. |
bool MStatus::error | ( | ) | const [inline] |
Determines whether there is an error.
void MStatus::clear | ( | ) | [inline] |
Clear error codes from the MStatus instance. After this call, it will behave as if it contained MS::kSuccess.
MStatus::MStatusCode MStatus::statusCode | ( | ) | const [inline] |
Retrieve the type of error that occurred, as specified in the MStatusCode enumeration.
MString MStatus::errorString | ( | ) | const |
void MStatus::perror | ( | const char * | preString | ) | const |
This method prints the error string preceded by a string supplied by the user to the standard error stream.
[in] | preString | A pointer to char that points to a null terminated string. |
void MStatus::perror | ( | const MString & | preString | ) | const |
void MStatus::set | ( | bool | status, | |
unsigned char | statusCode, | |||
unsigned char | internalStatusCode | |||
) | [inline] |
Internal use only.
The method is called interally by Maya to construct MStatus objects. It should not be called from plugins.
[in] | status | true or false |
[in] | statusCode | an element of MStatusCode |
[in] | internalStatusCode | an internal Maya error code |
void MStatus::setSuccess | ( | ) | [inline] |
The method is called interally by Maya to set the status as success. It should not be called from plugins.
MStatus::operator bool | ( | ) | const [inline] |
OPENMAYA_EXPORT std::ostream& operator<< | ( | std::ostream & | out, | |
MStatus & | status | |||
) | [friend] |
NO SCRIPT SUPPORT.
The output operator of the class. This method outputs the detailed status code as well as the internal error description. The format of the output is "(errNumber): errorDescriptiveText".
[in] | out | The ostream object that the output should be directed to. |
[in] | status | The MStatus object. |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |