char *msg = new char[12 + sizeof(FileName)];
strcpy(msg, "Can't open ");
strcat(msg, FileName);
- throw rfb::Exception(msg,"RfbPlayer Error");
+ throw rfb::Exception(msg);
}
byte b[12];
b[4] != '0' || b[5] != '0' || b[6] != '1' || b[7] != '.' ||
b[8] < '0' || b[8] > '9' || b[9] < '0' || b[9] > '9' ||
b[10] < '0' || b[10] > '9' || b[11] != '\n') {
- throw rfb::Exception("Incorrect protocol version", "RfbPlayer Error");
+ throw rfb::Exception("Incorrect protocol version");
}
}
// Perform backwardSeek (throws the special exception)
if (seekBackwards) {
- throw rfb::Exception("[REWIND]", "RfbPlayer");
+ throw rfb::Exception("[REWIND]");
}
// Save a tail of data
int count = fread(b, 1, n - off, fbsFile);
if (count < n) {
if (ferror(fbsFile))
- throw rfb::Exception("Read error from session file", "RfbPlayer Error");
+ throw rfb::Exception("Read error from session file");
if (feof(fbsFile))
- throw rfb::Exception("[End Of File]", "RfbPlayer Error");
+ throw rfb::Exception("[End Of File]");
}
off += count;
}
askPixelFormat = regKey.getBool(_T("AskPixelFormat"), DEFAULT_ASK_PF);
if (pPF) delete pPF;
} catch (rdr::Exception e) {
- MessageBox(0, e.str(), e.type(), MB_OK | MB_ICONERROR);
+ MessageBox(0, e.str(), "RFB Player", MB_OK | MB_ICONERROR);
}
}
regKey.setBool(_T("AutoPlay"), autoPlay);
regKey.setBool(_T("AskPixelFormat"), askPixelFormat);
} catch (rdr::Exception e) {
- MessageBox(0, e.str(), e.type(), MB_OK | MB_ICONERROR);
+ MessageBox(0, e.str(), "RFB Player", MB_OK | MB_ICONERROR);
}
}
bool done;
if (!cp.readVersion(is, &done)) {
state_ = RFBSTATE_INVALID;
- throw rfb::Exception("reading version failed: wrong file format?", "RfbPlayer");
+ throw rfb::Exception("reading version failed: wrong file format?");
}
if (!done) return;
sprintf(msg,"File have unsupported RFB protocol version %d.%d",
cp.majorVersion, cp.minorVersion);
state_ = RFBSTATE_INVALID;
- throw rfb::Exception(msg, "RfbPlayer Error");
+ throw rfb::Exception(msg);
}
state_ = RFBSTATE_SECURITY;
int reasonLen = is->readU32();
char *reason = new char[reasonLen];
is->readBytes(reason, reasonLen);
- throw rfb::Exception(reason, "RfbPlayer");
+ throw rfb::Exception(reason);
}
if (secType != secTypeNone) {
- throw rfb::Exception("Wrong authentication type in the session file",
- "RfbPlayer Error");
+ throw rfb::Exception("Wrong authentication type in the session file");
}
state_ = RFBSTATE_INITIALISATION;
try {
rfbSession->processMsg();
} catch (rdr::Exception e) {
- MessageBox(0, e.str(), e.type(), MB_OK | MB_ICONERROR);
+ MessageBox(0, e.str(), "RFB Player", MB_OK | MB_ICONERROR);
break;
}
}
char message[256] = "\0";
strcat(message, e.str());
strcat(message, "\nMaybe you force wrong the pixel format for this session");
- MessageBox(getMainHandle(), message, e.type(), MB_OK | MB_ICONERROR);
+ MessageBox(getMainHandle(), message, "RFB Player", MB_OK | MB_ICONERROR);
sessionTerminateThread *terminate = new sessionTerminateThread(this);
terminate->start();
return;
void RfbPlayer::setColourMapEntries(int first, int count, U16* rgbs) {
vlog.debug("setColourMapEntries: first=%d, count=%d", first, count);
- throw rdr::Exception("Can't handle SetColourMapEntries message", "RfbPlayer");
+ throw rdr::Exception("Can't handle SetColourMapEntries message");
/* int i;
for (i=0;i<count;i++) {
buffer->setColour(i+first, rgbs[i*3], rgbs[i*3+1], rgbs[i*3+2]);
if (strcmp(e.str(), "[End Of File]") == 0) {
return sessionFile.getTimeOffset();
} else {
- MessageBox(getMainHandle(), e.str(), e.type(), MB_OK | MB_ICONERROR);
+ MessageBox(getMainHandle(), e.str(), "RFB Player", MB_OK | MB_ICONERROR);
return 0;
}
}
try {
player = new RfbPlayer(fileName, &playerOptions);
} catch (rdr::Exception e) {
- MessageBox(NULL, e.str(), e.type(), MB_OK | MB_ICONERROR);
+ MessageBox(NULL, e.str(), "RFB Player", MB_OK | MB_ICONERROR);
delete player;
return 0;
}
try{
if (player) delete player;
} catch (rdr::Exception e) {
- MessageBox(NULL, e.str(), e.type(), MB_OK | MB_ICONERROR);
+ MessageBox(NULL, e.str(), "RFB Player", MB_OK | MB_ICONERROR);
}
return 0;