----------------------------------------------------------------------------------------
| 113 | |
| 114 | // ---------------------------------------------------------------------------------------- |
| 115 | FILE * jpeg_loader::check_file( const char* filename ) |
| 116 | { |
| 117 | if ( filename == NULL ) |
| 118 | { |
| 119 | throw image_load_error("jpeg_loader: invalid filename, it is NULL"); |
| 120 | } |
| 121 | FILE *fp = fopen( filename, "rb" ); |
| 122 | if ( !fp ) |
| 123 | { |
| 124 | throw image_load_error(std::string("jpeg_loader: unable to open file ") + filename); |
| 125 | } |
| 126 | return fp; |
| 127 | } |
| 128 | |
| 129 | // ---------------------------------------------------------------------------------------- |
| 130 |
nothing calls this directly
no test coverage detected