#include <boost/format.hpp>
#include <string>
#include <stdexcept>
#include <iostream>
int N_size_file = 5000;
int N_MAX = 4500;
void f()
{
if(N_size_file > N_MAX)
throw std::runtime_error( str(boost::format(
"check(): Hidden node count of %d exceeds maximum allowed value of %d ")
% N_size_file % N_MAX));
}
int main()
{
try {
f();
} catch(const std::exception& e) {
std::cout << "Caught exception: " << e.what() << '\n';
}
}
I2luY2x1ZGUgPGJvb3N0L2Zvcm1hdC5ocHA+CiNpbmNsdWRlIDxzdHJpbmc+CiNpbmNsdWRlIDxzdGRleGNlcHQ+CiNpbmNsdWRlIDxpb3N0cmVhbT4KaW50IE5fc2l6ZV9maWxlID0gNTAwMDsKaW50IE5fTUFYID0gNDUwMDsKdm9pZCBmKCkKewogICAgaWYoTl9zaXplX2ZpbGUgPiBOX01BWCkKICAgICAgICB0aHJvdyBzdGQ6OnJ1bnRpbWVfZXJyb3IoIHN0cihib29zdDo6Zm9ybWF0KAogICAgICAgICAgICAiY2hlY2soKTogSGlkZGVuIG5vZGUgY291bnQgb2YgJWQgZXhjZWVkcyBtYXhpbXVtIGFsbG93ZWQgdmFsdWUgb2YgJWQgIikKICAgICAgICAgICAgJSBOX3NpemVfZmlsZSAlIE5fTUFYKSk7Cn0KaW50IG1haW4oKQp7CiAgICB0cnkgewogICAgICAgIGYoKTsKICAgIH0gY2F0Y2goY29uc3Qgc3RkOjpleGNlcHRpb24mIGUpIHsKICAgICAgICBzdGQ6OmNvdXQgPDwgIkNhdWdodCBleGNlcHRpb246ICIgPDwgZS53aGF0KCkgPDwgJ1xuJzsKICAgIH0KfQ==