Overview   Project   Class   Tree   Index 
NXT C++ Bluetooth Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

NXT C++ Bluetooth Library
Class Nxt_exception

exception
   |
   +--Nxt_exception

   in error.h
   in error.cpp

class Nxt_exception
extends exception

Class used to throw exceptions when communication fails or the NXT reports an error

See Also:
Nxt_errors

Constructor Summary
Nxt_exception( string function_name, string class_name, unsigned int error_code, string description = "" )
          
~Nxt_exception()
          
 
Method Summary
 unsigned int error_code()
          Get the error code that was thrown
 Error_type error_type()
          Get the error type that was thrown
 const char* what() const
          What is the error
 const std::string who()
          Who threw the exception
 

Constructor Detail

Nxt_exception

public Nxt_exception( string function_name, string class_name, unsigned int error_code, string description = "" );
Parameters:
function_name - [the name of the function that throws the exception]
class_name - [the name of the Class that throws the exception]
error_code - [the error code that is thrown]
description - [a description of the error - if not speficied default description is used]

~Nxt_exception

public ~Nxt_exception() throw();


Method Detail

error_code

public unsigned int error_code();
Get the error code that was thrown
Returns:
the error code
See Also:
Nxt_errors

error_type

public Error_type error_type();
Get the error type that was thrown
Returns:
the error type
See Also:
Error_type

what

public const char* what() const throw();
What is the error
Returns:
a string that describes the error

who

public const std::string who();
Who threw the exception
Returns:
a string that tells the class and the function that threw the exception (used for debug)

 Overview   Project   Class   Tree   Index 
NXT C++ Bluetooth Library
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD