aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2016-12-17 14:04:39 +0100
committerPierre Ossman <ossman@cendio.se>2017-01-03 13:50:32 +0100
commitfefd9001ed873889ec9f9db0f89134d86f7b1d51 (patch)
treecc64f49a6a592facd0145755d798419ecfd4c65b /vncviewer
parent9a73adf9f47c8fab82add168bf7f50b7fe6ef2a3 (diff)
downloadtigervnc-fefd9001ed873889ec9f9db0f89134d86f7b1d51.tar.gz
tigervnc-fefd9001ed873889ec9f9db0f89134d86f7b1d51.zip
Avoid translating simple error exceptions
These are very rare and very low level. Might as well just print the offending call to keep things easily maintained.
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/OSXPixelBuffer.cxx4
-rw-r--r--vncviewer/Win32PixelBuffer.cxx12
-rw-r--r--vncviewer/X11PixelBuffer.cxx4
3 files changed, 10 insertions, 10 deletions
diff --git a/vncviewer/OSXPixelBuffer.cxx b/vncviewer/OSXPixelBuffer.cxx
index e9100f27..d04d9b30 100644
--- a/vncviewer/OSXPixelBuffer.cxx
+++ b/vncviewer/OSXPixelBuffer.cxx
@@ -49,13 +49,13 @@ OSXPixelBuffer::OSXPixelBuffer(int width, int height) :
lut = CGColorSpaceCreateDeviceRGB();
if (!lut)
- throw rfb::Exception(_("Could not create framebuffer device"));
+ throw rfb::Exception("CGColorSpaceCreateDeviceRGB");
bitmap = CGBitmapContextCreate(data, width, height, 8, width*4, lut,
kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Little);
CGColorSpaceRelease(lut);
if (!bitmap)
- throw rfb::Exception(_("Could not create framebuffer bitmap"));
+ throw rfb::Exception("CGBitmapContextCreate");
}
diff --git a/vncviewer/Win32PixelBuffer.cxx b/vncviewer/Win32PixelBuffer.cxx
index 3f825304..002d4c82 100644
--- a/vncviewer/Win32PixelBuffer.cxx
+++ b/vncviewer/Win32PixelBuffer.cxx
@@ -57,10 +57,8 @@ Win32PixelBuffer::Win32PixelBuffer(int width, int height) :
bitmap = CreateDIBSection(NULL, (BITMAPINFO*)&bih,
DIB_RGB_COLORS, (void**)&data, NULL, 0);
- if (!bitmap) {
- int err = GetLastError();
- throw rdr::SystemException(_("unable to create DIB section"), err);
- }
+ if (!bitmap)
+ throw rdr::SystemException("CreateDIBSection", GetLastError());
}
@@ -76,10 +74,10 @@ void Win32PixelBuffer::draw(int src_x, int src_y, int x, int y, int w, int h)
dc = CreateCompatibleDC(fl_gc);
if (!dc)
- throw rdr::SystemException(_("CreateCompatibleDC failed"), GetLastError());
+ throw rdr::SystemException("CreateCompatibleDC", GetLastError());
if (!SelectObject(dc, bitmap))
- throw rdr::SystemException(_("SelectObject failed"), GetLastError());
+ throw rdr::SystemException("SelectObject", GetLastError());
if (!BitBlt(fl_gc, x, y, w, h, dc, src_x, src_y, SRCCOPY)) {
// If the desktop we're rendering to is inactive (like when the screen
@@ -88,7 +86,7 @@ void Win32PixelBuffer::draw(int src_x, int src_y, int x, int y, int w, int h)
// with it. For now, we've only seen this error and for this function
// so only ignore this combination.
if (GetLastError() != ERROR_INVALID_HANDLE)
- throw rdr::SystemException(_("BitBlt failed"), GetLastError());
+ throw rdr::SystemException("BitBlt", GetLastError());
}
DeleteDC(dc);
diff --git a/vncviewer/X11PixelBuffer.cxx b/vncviewer/X11PixelBuffer.cxx
index ce5c4d82..a1d7687e 100644
--- a/vncviewer/X11PixelBuffer.cxx
+++ b/vncviewer/X11PixelBuffer.cxx
@@ -110,11 +110,13 @@ X11PixelBuffer::X11PixelBuffer(int width, int height) :
xim = XCreateImage(fl_display, fl_visual->visual, fl_visual->depth,
ZPixmap, 0, 0, width, height, BitmapPad(fl_display), 0);
if (!xim)
- throw rfb::Exception(_("Could not create framebuffer image"));
+ throw rfb::Exception("XCreateImage");
xim->data = (char*)malloc(xim->bytes_per_line * xim->height);
if (!xim->data)
throw rfb::Exception(_("Not enough memory for framebuffer"));
+
+ vlog.debug("Using standard XImage");
}
data = (rdr::U8*)xim->data;