PageRenderTime 684ms queryFilters 2ms Sphinxql 21ms app.CodeModel.GetByIds 593ms findMatchingLines 48ms GetByIds 641ms meta 0ms repositoryFilters 9ms languageFilters 0ms sourceFilters 3ms

7,716 results for 'throw.* runtime_error lang:c++' (684 ms)

Source

Language

Repository

IO.cpp https://github.com/ndavid/libpointmatcher.git | C++ | 2,225 lines
120				errorMsg << "Error at line " << lineCount+1 << ": expecting " << elementCount << " columns but read " << parsedLine.size() << " elements.";
121				throw runtime_error(errorMsg.str());	
122			}
223	if (found3dInitialTrans && found2dGroundTruthTrans)
224		throw runtime_error("Initial transformation is in 3D but ground-truth is in 2D");
225	if (found2dInitialTrans && found3dGroundTruthTrans)
225	if (found2dInitialTrans && found3dGroundTruthTrans)
226		throw runtime_error("Initial transformation is in 2D but ground-truth is in 3D");
227	CsvElements::const_iterator readingIt(data.find("reading"));
228	if (readingIt == data.end())
229		throw runtime_error("Error transfering CSV to structure: The header should at least contain \"reading\".");
230	CsvElements::const_iterator referenceIt(data.find("reference"));
345
346//! Throw a runtime_error exception if fileName cannot be opened
347void PointMatcherSupport::validateFile(const std::string& fileName)
Server.cpp git://github.com/swganh/mmoserver.git | C++ | 148 lines
86    // The help argument has been flagged, display the
87    // server options and throw a runtime_error exception
88    // to stop server startup.
91        std::cout << configuration_options_description_ << std::endl;
92        throw std::runtime_error("Help option flagged.");
93    }
99    // that are to be loaded. If a configuration file
100    // is missing, throw a runtime_error.
101    std::for_each(config_files.begin(), config_files.end(), [=] (const std::string& filename) {
103        if(!config_file)
104            throw std::runtime_error("Could not open configuration file.");
105        else
111    // The help argument has been flagged, display the
112    // server options and throw a runtime_error exception
113    // to stop server startup.
table_entry.cpp git://github.com/alanxz/libamqp-cpp.git | C++ | 351 lines
177  {
178    throw std:: runtime_error("Table entry key name is not valid.");
179  }
186  {
187    throw std::runtime_error("Table entry key name is not valid.");
188  }
194  {
195    throw std:: runtime_error("Table entry key name is not valid.");
196  }
202  {
203    throw std:: runtime_error("Table entry key name is not valid.");
204  }
210  {
211    throw std:: runtime_error("Table entry key name is not valid.");
212  }
boolean.cpp https://bitbucket.org/meyersh/gimli.git | C++ | 263 lines
123	    /* process all ops until we find the opening paren
124	     * or die trying. Throw a runtime_error if we have
125	     * ops without enough numbers. */
131	       cout << "ops.size(): " << ops.size() << endl;
132	       throw runtime_error("Bailing out!");
133	       }
141	    else
142	       throw runtime_error("Mis-matched parens.");
143	    }
145	 else if (isdigit(token))
146	    throw runtime_error("Numbers are not allowed in this equation.");
147	 else
147	 else
148	    throw runtime_error("Unhandled problem (invalid equation!)");
149	
nexus_retriever.cpp https://github.com/Acidburn0zzz/code.git | C++ | 238 lines
12using std::invalid_argument;
13using std::runtime_error;
14using std::string;
40    if(!is_readable)
41      throw runtime_error(source+" is not readable");
42  }
48    delete handle;
49    throw runtime_error("NXopen failed");
50  }
56    if(NXclose(handle)!=NX_OK)
57      throw runtime_error("NXclose failed");
58    delete handle;
62/**
63 * This can throw a runtime_error if something goes wrong
64 */
nexus_util.cpp https://github.com/Acidburn0zzz/code.git | C++ | 448 lines
20using std::invalid_argument;
21using std::runtime_error;
22using std::string;
88          std::cout << "NXmakedata failed" << std::endl;
89          throw runtime_error("NXmakedata failed");
90        }
100          std::cout << "NXcompmakedata failed" << std::endl;
101          throw runtime_error("NXcompmakedata failed");
102        }
107    if(NXopendata(*handle,name)!=NX_OK)
108      throw runtime_error("NXopendata failed");
109  }else{
113      if(NXmakegroup(*handle,name,type)!=NX_OK)
114        throw runtime_error("NXmakegroup failed");
115    if(NXopengroup(*handle,name,type)!=NX_OK)
m_abs.cc https://github.com/atmtools/arts.git | C++ | 1,902 lines
196      tgs.push_back(this_group);
197    } catch (const std::runtime_error& e) {
198      // The file for the species could not be found.
248       << atmosphere_dim << ".";
249    throw runtime_error(os.str());
250  }
284       << "abs_xsec_per_species.nelem() = " << abs_xsec_per_species.nelem();
285    throw runtime_error(os.str());
286  }
296       << abs_xsec_per_species[0].ncols();
297    throw runtime_error(os.str());
298  }
459  if (!abs_xsec_agenda_checked)
460    throw runtime_error(
461        "You must call *abs_xsec_agenda_checkedCalc* before calling this method.");
gtest-extra-test.cc https://bitbucket.org/ChunkBuster/cis330-project-repo.git | C++ | 433 lines
76void throw_exception() {
77  throw std::runtime_error("test");
78}
198  using std::runtime_error;
199  EXPECT_THROW_MSG(throw runtime_error(""), runtime_error, "");
200  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(n++, runtime_error, ""), "");
200  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(n++, runtime_error, ""), "");
201  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(throw 1, runtime_error, ""), "");
202  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(
202  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(
203      throw runtime_error("a"), runtime_error, "b"), "");
204}
Pins.cpp https://github.com/amcjen/ncore.git | C++ | 389 lines
141  if ( ! isr_table.at(irq) )
142    throw new runtime_error("No handler assigned for this interrupt");
143
221    else
222      throw new runtime_error("Unknown pin value");
223  }
226  if ( pin < 0 || pin >= num_pins )
227    throw new runtime_error("Pin out of range");
228
230  if ( current == end )
231    throw new runtime_error("Expecting pin level");
232
246    if ( ++current == end )
247      throw new runtime_error("Expecting symbol name");
248
calpontsystemcatalog.cpp https://github.com/byte/infinidb.git | C++ | 5,693 lines
82fExeMgr->shutdown(); \
83throw runtime_error("CALPONT_INTERNAL_ERROR"); \
84}
663        }
664		catch ( runtime_error& e ) {
665			throw runtime_error ( e.what() );
694		if (tryCnt >= 5)
695			//throw runtime_error("Error occured when calling system catalog. ExeMgr is not functioning.");
696			throw IDBExcept(ERR_SYSTEM_CATALOG);
720		if ( retryNum >= 6 )
721			throw runtime_error("Error occured when calling makeJobList");
722#ifdef _MSC_VER
733		string emsg = jl->errMsg();
734		throw runtime_error("Error occured when calling system catalog (1). " + emsg);
735	}
test_streamutil.cxx https://bitbucket.org/rdpate/kniht | C++ | 201 lines
20    }
21    catch (runtime_error&) {}
22  }
30    }
31    catch (runtime_error&) {}
32  }
42    }
43    catch (runtime_error&) {}
44  }
62    }
63    catch (runtime_error&) {}
64    catch (...) { assert(false); }
Node.cpp https://bitbucket.org/alexander_schiendorfer/microdb-se.git | C++ | 464 lines
131    	} else {
132    		throw new runtime_error("Get next sibling is called on an inner node");
133    	}
142    	} else {
143    		throw new runtime_error("Set next sibling is called on an inner node");
144    	}
200    	if (isLeaf()) {
201    		throw runtime_error("GetValueAt is called for a leaf node");
202    	}
399    	if (isLeaf()) {
400    		throw runtime_error("Calling updatePageIdForInsertKey on a leaf");
401    	}
448    	} else {
449    		throw runtime_error("Set upper is called on an inner node");
450    	}
LatticeMBRGrid.cpp https://bitbucket.org/ufal/mosesdecoder.git | C++ | 214 lines
85            cerr << "Error: missing parameter for " << argi->first << endl;
86            throw runtime_error("Missing parameter");
87          } else {
90            if (m_grid[key].size() != 1) {
91              throw runtime_error("Duplicate grid argument");
92            }
100                cerr << "Error: Illegal grid parameter for " << argi->first << endl;
101                throw runtime_error("Illegal grid parameter");
102              }
162  if (!ioWrapper) {
163    throw runtime_error("Failed to initialise IOWrapper");
164  }
167  if (nBestSize <= 0) {
168    throw new runtime_error("Non-positive size specified for n-best list");
169  }
compiled_tests.cpp git://github.com/ChaiScript/ChaiScript.git | C++ | 1,411 lines
174  try {
175    chai.eval("throw(runtime_error(\"error\"));");
176    REQUIRE(false);
241
242TEST_CASE("Throw a runtime_error")
243{
246  try {
247    chai.eval("throw(runtime_error(\"error\"))", chaiscript::exception_specification<int, double, float, const std::string &, const std::exception &>());
248    REQUIRE(false);
1357
1358struct MyException : std::runtime_error
1359{
1359{
1360  using std::runtime_error::runtime_error;
1361  int value = 5;
EepromInternal.cpp https://github.com/amcjen/ncore.git | C++ | 217 lines
105  if ( current == end )
106    throw new runtime_error("Expecting value");
107
109  if ( c < '0' || c > '9' )
110    throw new runtime_error("Expecing numeric value");
111
125  if ( current == end )
126    throw new runtime_error("Expecting value");
127  */
129  if ( ( c < '0' || c > '9' ) && ( c < 'a' || c > 'f' ) )
130    throw new runtime_error("Expecing hexnumeric value");
131
146  if ( addr < 0 || addr >= eeprom_size )
147    throw new runtime_error("Address out of range");
148
ClassTranslator.cpp https://hg.codeplex.com/rootdotnet | C++ | 1,963 lines
31using std::string;
32using std::runtime_error;
33using std::set;
69	if (!check_inheritance_list(class_info)) {
70		throw new runtime_error ("Class '" + class_info.CPPName() + "' has some bad classes in its inherritance tree");
71	}
293	if (dir_loc == _base_directory.end()) {
294		throw runtime_error ("Unable to find base directory for library " + library_name);
295	}
635			}
636		} catch (runtime_error &e)
637		{
742			}
743		} catch (runtime_error &e)
744		{
test_streamutil.cpp https://bitbucket.org/kniht/scraps | C++ | 156 lines
20    }
21    catch (runtime_error&) {}
22  }
30    }
31    catch (runtime_error&) {}
32  }
42    }
43    catch (runtime_error&) {}
44  }
gtest-extra-test.cc https://github.com/cfanzp008/cppformat.git | C++ | 834 lines
105void ThrowException() {
106  throw std::runtime_error("test");
107}
227  using std::runtime_error;
228  EXPECT_THROW_MSG(throw runtime_error(""), runtime_error, "");
229  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(n++, runtime_error, ""), "");
229  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(n++, runtime_error, ""), "");
230  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(throw 1, runtime_error, ""), "");
231  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(
231  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(
232      throw runtime_error("a"), runtime_error, "b"), "");
233}
Dispatcher.cpp https://github.com/amcjen/ncore.git | C++ | 107 lines
31  if ( ! _commands.size() )
32    throw new runtime_error("Command string empty");
33
56      if ( ! objectmap.at("(default)")->runCommand(_commands) )
57	throw new runtime_error("Command not found");
58      else
61    else
62      throw new runtime_error("Command not found");
63  }
79  if ( ! obj )
80    throw new runtime_error("Object is NULL");
81
84  if ( ! list.size() )
85    throw new runtime_error("Object has no commands");
86
Logger.cpp https://github.com/amcjen/ncore.git | C++ | 345 lines
252    if ( regcomp(regex, _key.c_str(), REG_EXTENDED) )
253      throw new runtime_error( string("Error in regular expression ") + _key );
254  }
292    else
293      throw new runtime_error("Expected regex as operand");
294  }
295  else
296    throw new runtime_error("No parameters expected");
297
307  if ( current == _commands.end() )
308    throw new runtime_error("Expecting operand");
309
314    if ( current == _commands.end() )
315      throw new runtime_error("Expecting rate value");
316
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21