mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-06-07 06:25:26 -04:00
IGN:Updated translations
This commit is contained in:
+221
-189
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+467
-391
File diff suppressed because it is too large
Load Diff
+234
-195
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+229
-192
File diff suppressed because it is too large
Load Diff
+239
-199
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+222
-190
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+221
-189
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+235
-196
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+221
-189
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+221
-189
File diff suppressed because it is too large
Load Diff
+221
-189
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
+220
-188
File diff suppressed because it is too large
Load Diff
@@ -40,6 +40,12 @@ podofo_PDFDoc_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
return (PyObject *)self;
|
||||
}
|
||||
|
||||
static void podofo_set_exception(const PdfError &err) {
|
||||
const char *msg = PdfError::ErrorMessage(err.GetError());
|
||||
if (msg == NULL) msg = err.what();
|
||||
PyErr_SetString(PyExc_ValueError, msg);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
podofo_PDFDoc_load(podofo_PDFDoc *self, PyObject *args, PyObject *kwargs) {
|
||||
char *buffer; Py_ssize_t size;
|
||||
@@ -48,9 +54,7 @@ podofo_PDFDoc_load(podofo_PDFDoc *self, PyObject *args, PyObject *kwargs) {
|
||||
try {
|
||||
self->doc->Load(buffer, size);
|
||||
} catch(const PdfError & err) {
|
||||
const char *msg = PdfError::ErrorMessage(err.GetError());
|
||||
if (msg == NULL) msg = err.what();
|
||||
PyErr_SetString(PyExc_ValueError, msg);
|
||||
podofo_set_exception(err);
|
||||
return NULL;
|
||||
}
|
||||
} else return NULL;
|
||||
@@ -68,7 +72,7 @@ podofo_PDFDoc_save(podofo_PDFDoc *self, PyObject *args, PyObject *kwargs) {
|
||||
try {
|
||||
self->doc->Write(buffer);
|
||||
} catch(const PdfError & err) {
|
||||
PyErr_SetString(PyExc_ValueError, PdfError::ErrorMessage(err.GetError()));
|
||||
podofo_set_exception(err);
|
||||
return NULL;
|
||||
}
|
||||
} else return NULL;
|
||||
|
||||
Reference in New Issue
Block a user