compilable and usable
This commit is contained in:
@@ -43,7 +43,8 @@ namespace pcsc {
|
||||
std::string hex(const std::string& data) {
|
||||
std::stringstream res;
|
||||
for (std::string::const_iterator it(data.begin()); it!=data.end(); ++it)
|
||||
res<<std::hex<<std::setfill('0')<<std::setw(2)<<(int)*it;
|
||||
res<<"(0x"<<std::hex<<std::setfill('0')<<std::setw(2)
|
||||
<<(unsigned int)(unsigned char)*it<<')';
|
||||
return res.str();
|
||||
}
|
||||
|
||||
@@ -59,14 +60,14 @@ namespace pcsc {
|
||||
std::string _what;
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
class not_implemented: exception {
|
||||
class not_implemented: public exception {
|
||||
public:
|
||||
not_implemented(const std::string& reason) throw():
|
||||
exception("feature is not implemented:\n"+reason) {
|
||||
}
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
class access_error: exception {
|
||||
class access_error: public exception {
|
||||
public:
|
||||
access_error(const std::string& reason) throw():
|
||||
exception("smardcard access error:\n"+reason) {
|
||||
|
Reference in New Issue
Block a user