MCPcopy Create free account
hub / github.com/davisking/dlib / check_file

Method check_file

dlib/image_loader/jpeg_loader.cpp:115–127  ·  view source on GitHub ↗

----------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

image_load_errorClass · 0.70

Tested by

no test coverage detected