Browse Source

Suggest reporting a bug for some errors

pull/44/head
Daniel Scharrer 11 years ago
parent
commit
da69d81017
  1. 5
      VERSION
  2. 9
      src/cli/main.cpp
  3. 6
      src/release.cpp.in
  4. 3
      src/release.hpp

5
VERSION

@ -1,2 +1,7 @@
innoextract 1.4-git
Known working Inno Setup versions:
Inno Setup 1.2.10 to 5.5.5
Bug tracker:
http://innoextract.constexpr.org/issues

9
src/cli/main.cpp

@ -328,6 +328,7 @@ int main(int argc, char * argv[]) {
const std::vector<std::string> & files = options["setup-files"]
.as< std::vector<std::string> >();
bool suggest_bug_report = false;
try {
BOOST_FOREACH(const std::string & file, files) {
process_file(file, o);
@ -335,14 +336,22 @@ int main(int argc, char * argv[]) {
} catch(const std::ios_base::failure & e) {
log_error << "Stream error while extracting files!\n"
<< " └─ error reason was " << e.what();
suggest_bug_report = true;
} catch(const format_error & e) {
log_error << e.what();
suggest_bug_report = true;
} catch(const std::runtime_error & e) {
log_error << e.what();
} catch(const setup::version_error &) {
log_error << "Not a supported Inno Setup installer!";
}
if(suggest_bug_report) {
std::cerr << color::blue << "If you are sure the setup file is not corrupted,"
<< " consider \nfiling a bug report at "
<< color::dim_cyan << innoextract_bugs << color::reset << '\n';
}
if(!logger::quiet || logger::total_errors || logger::total_warnings) {
progress::clear();
std::ostream & os = logger::quiet ? std::cerr : std::cout;

6
src/release.cpp.in

@ -28,7 +28,7 @@
* For available variables see cmake/VersionString.cmake.
*/
#if ${VERSION_COUNT} != 2
#if ${VERSION_COUNT} != 5
#error "Configure error - the VERSION file should specify exactly two lines!"
#endif
@ -40,7 +40,9 @@ const char innoextract_name[] = "${VERSION_0_NAME}";
const char innoextract_version[] = "${VERSION_0_NUMBER}${GIT_SUFFIX_5}";
const char innosetup_versions[] = "${VERSION_1}";
const char innosetup_versions[] = "${VERSION_2}";
const char innoextract_bugs[] = "${VERSION_4}";
const char innoextract_copyright[] = "${LICENSE_0_STRING}";

3
src/release.hpp

@ -35,6 +35,9 @@ extern const char innoextract_version[];
//! Range of supported Inno Setup versions
extern const char innosetup_versions[];
//! Bug tracker URL
extern const char innoextract_bugs[];
//! Copyright line for the current program
extern const char innoextract_copyright[];

Loading…
Cancel
Save