src/Generic/patterns/PatternReturn.cpp
/**
 * Convenience method that formats an Sexp for throwing
 * an UnexpectedInputException. Copied from
 * Pattern::throwError.
 *
 * @param sexp The S-expression that caused the error
 * @param reason Text error message
 *
 * @author nward@bbn.com
 * @date 2010.06.28
 **/
Convenience method that formats an Sexp for throwing
an UnexpectedInputException. Copied from
Pattern::throwError.

@param sexp The S-expression that caused the error
@param reason Text error message


Convenience method that formats an Sexp for throwing an UnexpectedInputException . Copied from Pattern :: throwError . @param sexp The S - expression that caused the error @param reason Text error message
void PatternReturn::throwError(Sexp* sexp, const char* reason) {
	std::stringstream error;
	error << reason << ": " << sexp->to_debug_string();
	throw UnexpectedInputException("PatternReturn::throwError", error.str().c_str());
}
void PatternReturn :: throwError ( Sexp * sexp , const char * reason ) { std :: stringstream error ; error << reason << " " << sexp -> to_debug_string ( ) ; throw UnexpectedInputException ( " " , error . str ( ) . c_str ( ) ) ; }
Convenience method that formats an Sexp for throwing
 an UnexpectedInputException.
Convenience method that formats an Sexp for throwing an UnexpectedInputException .