Changeset 4431
- Timestamp:
- Jan 21, 2015, 11:26:40 AM (4 years ago)
- Location:
- icGREP/icgrep-devel/icgrep
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
icGREP/icgrep-devel/icgrep/UCD/PropertyObjects.h
r4397 r4431 12 12 #include <iostream> 13 13 #include <unordered_map> 14 #include <stdexcept> 14 15 #include "unicode_set.h" 15 16 #include "PropertyAliases.h" … … 57 58 58 59 UnicodeSet UnsupportedPropertyObject::GetCodepointSet(std::string value_spec) { 59 std::cerr << "Property " << UCD::property_full_name[the_property] << " unsupported.\n"; 60 exit(-1); 60 throw std::runtime_error("Property " + UCD::property_full_name[the_property] + " unsupported."); 61 61 } 62 62 … … 84 84 int property_enum_val = GetPropertyValueEnumCode(value_spec); 85 85 if (property_enum_val == -1) { 86 std::cerr << "Enumerated Property " << UCD::property_full_name[the_property] << ": unknown value: " << value_spec << ".\n"; 87 exit(-1); 86 throw std::runtime_error("Enumerated Property " + UCD::property_full_name[the_property] + ": unknown value: " + value_spec); 88 87 } 89 88 else { 90 std::cout << "Enumerated Property: " << UCD::property_full_name[the_property] << ", value: " << property_value_full_names[property_enum_val] << "(" << property_enum_val << ").\n";89 //std::cout << "Enumerated Property: " << UCD::property_full_name[the_property] << ", value: " << property_value_full_names[property_enum_val] << "(" << property_enum_val << ").\n"; 91 90 return property_value_sets[property_enum_val]; 92 91 } … … 122 121 auto valit = Binary_ns::aliases_only_map.find(value_spec); 123 122 if (valit == Binary_ns::aliases_only_map.end()) { 124 std::cerr << "Binary property " << property_full_name[the_property] << ": bad value: " << value_spec << ".\n"; 125 exit(-1); 123 throw std::runtime_error("Binary Property " + UCD::property_full_name[the_property] + ": bad value: " + value_spec); 126 124 } 127 125 else property_enum_val = valit->second; -
icGREP/icgrep-devel/icgrep/cc/cc_compiler.cpp
r4410 r4431 96 96 } 97 97 else if (isa<CC>(re)) { 98 std::cerr << "Shouldn't get here\n"; 99 exit(-1); 98 throw std::runtime_error("icgrep internal error: unexpected CC object found in compileByteClasses."); 100 99 } 101 100 } -
icGREP/icgrep-devel/icgrep/compiler.cpp
r4416 r4431 66 66 catch (ParseFailure failure) 67 67 { 68 std::cerr << "R EGEX PARSING FAILURE: " << failure.what() << std::endl;68 std::cerr << "Regex parsing failure: " << failure.what() << std::endl; 69 69 std::cerr << regexps[i] << std::endl; 70 70 exit(1);
Note: See TracChangeset
for help on using the changeset viewer.