Ignore:
Timestamp:
Apr 6, 2011, 1:50:42 PM (14 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
336e33
Parents:
b94634
git-author:
Frederik Heber <heber@…> (04/01/11 22:29:00)
git-committer:
Frederik Heber <heber@…> (04/06/11 13:50:42)
Message:

Removed IllegalTypeException from Exceptions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/ValueStorage.cpp

    rb94634 r882678  
    6868    CurrentValueMap.erase(name);
    6969  } else
    70     throw IllegalTypeException(__FILE__,__LINE__);
     70    throw IllegalTypeException() << ValueStorageOptionName(name)
     71        << ValueStoragePairTypeName(std::make_pair(
     72            typeid(_T).name(),
     73            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     74            );
    7175  _T = World::getInstance().getAtom(AtomById(atomID));
    7276}
     
    8084    CurrentValueMap.erase(name);
    8185  } else
    82     throw IllegalTypeException(__FILE__,__LINE__);
     86    throw IllegalTypeException() << ValueStorageOptionName(name)
     87        << ValueStoragePairTypeName(std::make_pair(
     88            typeid(_T).name(),
     89            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     90            );
    8391  _T = World::getInstance().getPeriode()->FindElement(Z);
    8492}
     
    92100    CurrentValueMap.erase(name);
    93101  } else
    94     throw IllegalTypeException(__FILE__,__LINE__);
     102    throw IllegalTypeException() << ValueStorageOptionName(name)
     103        << ValueStoragePairTypeName(std::make_pair(
     104            typeid(_T).name(),
     105            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     106            );
    95107  _T = World::getInstance().getMolecule(MoleculeById(molID));
    96108}
     
    121133    CurrentValueMap.erase(name);
    122134  } else
    123     throw IllegalTypeException(__FILE__,__LINE__);
     135    throw IllegalTypeException() << ValueStorageOptionName(name)
     136        << ValueStoragePairTypeName(std::make_pair(
     137            typeid(_T).name(),
     138            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     139            );
    124140}
    125141
     
    134150    }
    135151  } else
    136     throw IllegalTypeException(__FILE__,__LINE__);
     152    throw IllegalTypeException() << ValueStorageOptionName(name)
     153        << ValueStoragePairTypeName(std::make_pair(
     154            typeid(_T).name(),
     155            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     156            );
    137157}
    138158
     
    147167    }
    148168  } else
    149     throw IllegalTypeException(__FILE__,__LINE__);
     169    throw IllegalTypeException() << ValueStorageOptionName(name)
     170        << ValueStoragePairTypeName(std::make_pair(
     171            typeid(_T).name(),
     172            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     173            );
    150174}
    151175
     
    159183        "ValueStorage::queryCurrentValue() - RandomNumberDistribution_Parameters in value map has only no components!");
    160184  } else
    161     throw IllegalTypeException(__FILE__,__LINE__);
     185    throw IllegalTypeException() << ValueStorageOptionName(name)
     186        << ValueStoragePairTypeName(std::make_pair(
     187            typeid(_T).name(),
     188            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     189            );
    162190}
    163191
     
    186214    }
    187215  } else
    188     throw IllegalTypeException(__FILE__,__LINE__);
     216    throw IllegalTypeException() << ValueStorageOptionName(name)
     217        << ValueStoragePairTypeName(std::make_pair(
     218            typeid(_T).name(),
     219            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     220            );
    189221}
    190222
     
    212244    }
    213245  } else
    214     throw IllegalTypeException(__FILE__,__LINE__);
     246    throw IllegalTypeException() << ValueStorageOptionName(name)
     247        << ValueStoragePairTypeName(std::make_pair(
     248            typeid(_T).name(),
     249            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     250            );
    215251}
    216252
     
    239275    }
    240276  } else
    241     throw IllegalTypeException(__FILE__,__LINE__);
     277    throw IllegalTypeException() << ValueStorageOptionName(name)
     278        << ValueStoragePairTypeName(std::make_pair(
     279            typeid(_T).name(),
     280            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     281            );
    242282}
    243283
     
    255295    _T = tmp;
    256296  } else
    257     throw IllegalTypeException(__FILE__,__LINE__);
     297    throw IllegalTypeException() << ValueStorageOptionName(name)
     298        << ValueStoragePairTypeName(std::make_pair(
     299            typeid(_T).name(),
     300            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     301            );
    258302}
    259303
     
    265309    CurrentValueMap[name] = stream.str();
    266310  } else
    267     throw IllegalTypeException(__FILE__,__LINE__);
     311    throw IllegalTypeException() << ValueStorageOptionName(name)
     312        << ValueStoragePairTypeName(std::make_pair(
     313            typeid(_T).name(),
     314            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     315            );
    268316}
    269317
     
    275323    CurrentValueMap[name] = stream.str();
    276324  } else
    277     throw IllegalTypeException(__FILE__,__LINE__);
     325    throw IllegalTypeException() << ValueStorageOptionName(name)
     326        << ValueStoragePairTypeName(std::make_pair(
     327            typeid(_T).name(),
     328            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     329            );
    278330}
    279331
     
    285337    CurrentValueMap[name] = stream.str();
    286338  } else
    287     throw IllegalTypeException(__FILE__,__LINE__);
     339    throw IllegalTypeException() << ValueStorageOptionName(name)
     340        << ValueStoragePairTypeName(std::make_pair(
     341            typeid(_T).name(),
     342            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     343            );
    288344}
    289345
     
    301357    CurrentValueMap[name] = stream.str();
    302358  } else
    303     throw IllegalTypeException(__FILE__,__LINE__);
     359    throw IllegalTypeException() << ValueStorageOptionName(name)
     360        << ValueStoragePairTypeName(std::make_pair(
     361            typeid(_T).name(),
     362            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     363            );
    304364}
    305365
     
    319379    CurrentValueMap[name] = stream.str();
    320380  } else
    321     throw IllegalTypeException(__FILE__,__LINE__);
     381    throw IllegalTypeException() << ValueStorageOptionName(name)
     382        << ValueStoragePairTypeName(std::make_pair(
     383            typeid(_T).name(),
     384            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     385            );
    322386}
    323387
     
    330394    DoLog(0) && (Log() << Verbose(0) << "ValueStorage::setCurrentValue() for "+toString(name)+" to "+stream.str()+"." << std::endl);
    331395  } else
    332     throw IllegalTypeException(__FILE__,__LINE__);
     396    throw IllegalTypeException() << ValueStorageOptionName(name)
     397        << ValueStoragePairTypeName(std::make_pair(
     398            typeid(_T).name(),
     399            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     400            );
    333401}
    334402
     
    342410    CurrentValueMap[name] = stream.str();
    343411  } else
    344     throw IllegalTypeException(__FILE__,__LINE__);
     412    throw IllegalTypeException() << ValueStorageOptionName(name)
     413        << ValueStoragePairTypeName(std::make_pair(
     414            typeid(_T).name(),
     415            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     416            );
    345417}
    346418
     
    354426    CurrentValueMap[name] = stream.str();
    355427  } else
    356     throw IllegalTypeException(__FILE__,__LINE__);
     428    throw IllegalTypeException() << ValueStorageOptionName(name)
     429        << ValueStoragePairTypeName(std::make_pair(
     430            typeid(_T).name(),
     431            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     432            );
    357433}
    358434
     
    366442    CurrentValueMap[name] = stream.str();
    367443  } else
    368     throw IllegalTypeException(__FILE__,__LINE__);
     444    throw IllegalTypeException() << ValueStorageOptionName(name)
     445        << ValueStoragePairTypeName(std::make_pair(
     446            typeid(_T).name(),
     447            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     448            );
    369449}
    370450
     
    376456    CurrentValueMap[name] = stream.str();
    377457  } else
    378     throw IllegalTypeException(__FILE__,__LINE__);
     458    throw IllegalTypeException() << ValueStorageOptionName(name)
     459        << ValueStoragePairTypeName(std::make_pair(
     460            typeid(_T).name(),
     461            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
     462            );
    379463}
    380464
Note: See TracChangeset for help on using the changeset viewer.