mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 14:08:09 -05:00
19 lines
306 B
C++
19 lines
306 B
C++
/*
|
|
* files.h
|
|
*
|
|
*/
|
|
|
|
#ifndef TOOLS_FILES_H_
|
|
#define TOOLS_FILES_H_
|
|
|
|
#include <iostream>
|
|
|
|
void open_with_check(std::ifstream& stream, const std::string& filename)
|
|
{
|
|
stream.open(filename);
|
|
if (not stream.good())
|
|
throw runtime_error("cannot open " + filename);
|
|
}
|
|
|
|
#endif /* TOOLS_FILES_H_ */
|