19+ results for 'throw.* runtime_error lang:c++' (0 ms)
Not the results you expected?
sc_http_curl.cpp (https://github.com/simulationcraft/simc.git) C++ · 327 lines
43 if ( ssl_proxy )
44 {
45 throw std::runtime_error( "Libcurl does not support HTTPS proxies" );
46 }
47 auto ret = curl_easy_setopt( m_handle, CURLOPT_PROXYTYPE, CURLPROXY_HTTP );
49 if ( ret != CURLE_OK )
50 {
51 throw std::runtime_error( fmt::format( "Unable to setup proxy: {}", m_error ) );
52 }
54 if ( curl_easy_setopt( m_handle, CURLOPT_PROXY, proxy.host.c_str() ) != CURLE_OK )
55 {
56 throw std::runtime_error( fmt::format( "Unable to setup proxy: {}", m_error ) );
57 }
KVBinaryOutputStreamSerializer.cpp (https://github.com/ConcealNetwork/conceal-core.git) C++ · 239 lines
32 void writeElementName(IOutputStream& s, Common::StringView name) {
33 if (name.getSize() > std::numeric_limits<uint8_t>::max()) {
34 throw std::runtime_error("Element name is too long");
35 }
49 } else {
50 if (val > 4611686018427387903) {
51 throw std::runtime_error("failed to pack varint - too big amount");
52 }
53 return packVarint<uint64_t>(s, PORTABLE_RAW_SIZE_MARK_INT64, val);
test_parser.cpp (https://github.com/Microsoft/krabsetw.git) C++ · 169 lines
sys.cpp (https://github.com/huoji120/Antivirus_R3_bypass_demo.git) C++ · 149 lines
12 {
13 if (BuildNumber < 7601) // Check if OSBuildNumber Is Supported
14 throw std::runtime_error("OS Not Supported.");
16 Driver = new gpuz(); // Initialize gpuz.sys IOCTL functions used for reading/writing System Memory
18 if (Driver == nullptr)
19 throw std::runtime_error("gpuz Class Object Is Not Initialized.");
21 g_CiVar = QueryVar() - 0x100000000; // Query The Global System Variable For Patching
67 HMODULE MappedImage = LoadLibraryExA(szSystemPath, NULL, DONT_RESOLVE_DLL_REFERENCES); // Load the system module to memory
68 if (!MappedImage)
69 throw std::runtime_error("Cannot Load System Image.");
71 if (!GetModuleInformation(GetCurrentProcess(), MappedImage, &ModInfo, sizeof(ModInfo))) // Get Information About It
fs.cpp (https://github.com/aseprite/laf.git) C++ · 313 lines
EdmondsKarp.cpp (https://github.com/kit-parco/networkit.git) C++ · 126 lines
ScreenControllerFactory.cpp (https://github.com/BlueBrain/Tide.git) C++ · 111 lines
get_config.cc (https://github.com/istio-ecosystem/authservice.git) C++ · 158 lines
23 string error;
24 if (!Validate(config, &error)) {
25 throw std::runtime_error(error);
26 }
58 try {
59 parsed_uri = std::make_unique<common::http::Uri>(uri);
60 } catch (std::runtime_error& e) {
61 if (std::string(e.what()).find("uri must be http or https scheme") !=
62 std::string::npos) {
63 throw std::runtime_error(
64 fmt::format("invalid {}: uri must be {} scheme: {}", uri_type,
65 required_scheme, uri));
render_utils.cpp (https://github.com/zilliztech/arctern.git) C++ · 146 lines
cvtFastPerform.cpp (https://github.com/epics-base/epics-base.git) C++ · 357 lines
selector.cpp (https://github.com/PRBonn/bonnetal.git) C++ · 68 lines
34 std::cerr << b << std::endl;
35 }
36 throw std::runtime_error("Choose a valid backend");
37 }
47 #else
48 // complain
49 throw std::runtime_error("'pytorch' backend implemented but not built.");
50 #endif
51 } else if (lc_backend == "tensorrt") {
55 #else
56 // complain
57 throw std::runtime_error("'tensorrt' backend implemented but not built.");
58 #endif
59 } else {
SDL2.cpp (https://bitbucket.org/sasiedu/nibbler.git) C++ · 181 lines
untar.cpp (https://gitlab.com/jbandela/ccpm.git) C++ · 183 lines
45 if (t == '5') return entry_type::directory;
46 // Only support files and directories
47 throw std::runtime_error("Invalid entry type");
49 }
82 std::string magic;
83 if ((magic = detail::get_magic(h_)) != "ustar" && magic.size()){
84 throw std::runtime_error("Only the ustar format is supported, unsupported format");
85 }
86 }
selector.cpp (https://github.com/PRBonn/rangenet_lib.git) C++ · 57 lines
KVBinaryOutputStreamSerializer.cpp (https://github.com/AlbertWerner/cryptonotecoin.git) C++ · 239 lines
29 void writeElementName(IOutputStream& s, const std::string& name) {
30 if (name.size() > std::numeric_limits<uint8_t>::max()) {
31 throw std::runtime_error("Element name is too long");
32 }
33 uint8_t len = static_cast<uint8_t>(name.size());
45 } else {
46 if (val > 4611686018427387903) {
47 throw std::runtime_error("failed to pack varint - too big amount");
48 }
49 return packVarint<uint64_t>(s, PORTABLE_RAW_SIZE_MARK_INT64, val);
193 bool KVBinaryOutputStreamSerializer::hasObject(const std::string& name) {
194 assert(false); //the method is not supported for this type of serialization
195 throw std::runtime_error("hasObject method is not supported in KVBinaryOutputStreamSerializer");
197 return false;
SimpleStoreMerger.cpp (https://github.com/gekkonerd/hyrise.git) C++ · 186 lines
137 if (useValid)
138 throw std::runtime_error("SimpleStoreMerger does not support valid vectors");
141 if (input_tables.size() != 2)
142 throw std::runtime_error("SimpleStoreMerger does not support more than two tables");
143 auto delta = std::dynamic_pointer_cast<const RawTable>(input_tables[1]);
144 auto main = input_tables[0];