1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
Adds additional error checking with useful errors when image loads fail in IMLIB
@@ -181,6 +181,46 @@
if (err == IMLIB_LOAD_ERROR_NO_LOADER_FOR_FILE_FORMAT) {
Perl_croak(aTHX_ "Image::Imlib2 load error: No loader for file format");
}
+
+ if (err == IMLIB_LOAD_ERROR_PATH_TOO_LONG) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Path too long");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_PATH_COMPONENT_NON_EXISTANT) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Path component non existant");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_PATH_COMPONENT_NOT_DIRECTORY) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Path component not directory");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_PATH_POINTS_OUTSIDE_ADDRESS_SPACE) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Path points outside address space");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_TOO_MANY_SYMBOLIC_LINKS) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Too many symbolic links");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_OUT_OF_MEMORY) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Out of memory");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_OUT_OF_FILE_DESCRIPTORS) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Out of file descriptors");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_PERMISSION_DENIED_TO_WRITE) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Permission denied to write");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_OUT_OF_DISK_SPACE) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Out of disk space");
+ }
+
+ if (err == IMLIB_LOAD_ERROR_UNKNOWN) {
+ Perl_croak(aTHX_ "Image::Imlib2 load error: Unknown");
+ }
RETVAL = image;
}
OUTPUT:
|