Wt  4.0.2
Public Member Functions | List of all members
Wt::Json::TypeException Class Reference

Exception that indicates a type error. More...

#include <Wt/Json/Value.h>

Inheritance diagram for Wt::Json::TypeException:
Inheritance graph

Public Member Functions

const std::string & name () const
 Returns the object field name (if known)
Type actualType () const
 Returns the value type.
Type expectedType () const
 Returns the expected value type.
- Public Member Functions inherited from Wt::WException
 WException (const std::string &what)
 Creates an exception.
 WException (const std::string &what, const std::exception &wrapped)
 Creates an exception.
virtual ~WException () throw ()
virtual const char * what () const override throw ()
 Returns the message.
void setMessage (const std::string &msg)
 Sets the message.

Detailed Description

Exception that indicates a type error.

This exception is thrown when a Value is being casted to an incompatible C++ type.

To avoid exceptions, coerce the type first, and handle Null values.

Generated on Fri Nov 24 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11