#include <algorithm>
#include <list>
-#include <msp/core/except.h>
+#include <stdexcept>
#include "utils.h"
using namespace std;
else if(*i>='A' && *i<='F')
digit = *i-'A'+10;
else
- throw InvalidParameterValue("Invalid hexadecimal digit");
+ throw invalid_argument("c_unescape");
numeric_value = (numeric_value<<4 | digit);
++numeric_pos;
if(*i>='0' && *i<='7')
digit = *i-'0';
else
- throw InvalidParameterValue("Invalid octal digit");
+ throw invalid_argument("c_unescape");
numeric_value = (numeric_value<<3 | digit);
++numeric_pos;
else if(*i=='\\')
result += '\\';
else
- throw InvalidParameterValue("Invalid escape sequence");
+ throw invalid_argument("c_unescape");
escape = false;
}
}
if(escape)
- throw InvalidParameterValue("Stray backslash at end of string");
+ throw invalid_argument("c_unescape");
return result;
}