webMathematica`

MSPException

MSPException[type]

an exception that can be thrown by webMathematica page commands

Details

  • A number of MSP commands throw an MSPException when some error situation occurs. These are caught by the page processing code, but it would be permissible for a page author to catch them and process them in some intermediate step.
  • The following exceptions can be thrown by MSPBlock.
  • MSPException["ParseError"]if the value cannot be interpreted by Mathematica
    MSPException["SecurityError"]if the value does not pass the security test
    MSPException["ValueError"]if the value is not a string, this indicates a programmatic error by the page author
    MSPException["VariableError"]if the variable is not a Mathematica symbol, this indicates a programmatic error by the page author
    MSPException["NoValueError"]if a variable has no value
    MSPException["VersionError"]if a version mismatch problem is found

Examples

Basic Examples  (1)

You can simulate how the function works by installing and loading the package.

If a variable cannot be interpreted, a ParseError exception is thrown. Since the values may be entered from the client, this does not indicate an author error.

If the result of interpretation does not pass the security check, a SecurityError exception is thrown. Since the values may be entered from the client, this does not indicate an author error.

If a variable that is not a Mathematica symbol is encountered, a VariableError exception is thrown. This usually indicates an author error.

If a value that is not a Mathematica string is encountered, a ValueError exception is thrown. This usually indicates an author error.