diff --git a/TODO.txt b/TODO.txt index 737cad749990b962f50a833db26894a74a1208f3..00c67b8e3e2cf4868427f90d02ea45925d445a87 100644 --- a/TODO.txt +++ b/TODO.txt @@ -37,18 +37,20 @@ Critical x EasyBMP shouldn't be taken from student's folder SSH for security /dev/shm - better output on student idiocy - x on crazy memory errors, glibc issues, valgrind aborts - x fix "" failure messages - if compilation fails + better output + personification + quotes of the day + man isatty - colors when terminal + better output on student idiocy + x on crazy memory errors, glibc issues, valgrind aborts + x fix "" failure messages + if compilation fails STYLE Directory structure for config.ini includes - setenv("PATH"...) to safe path and use execlp encrypt/secure pipe transfers readFile() bug where lines have ':' or '?' in them?! - quotes of the day - personification x safer cross-platform exec() + x setenv("PATH"...) to safe path and use execlp Moderately important --------------------- @@ -62,7 +64,6 @@ Moderately important fix sigalarm security hole optimization replace ln -s util/* system() calls - man isatty mp1_newtests and lab02_newtests currently have 2 different ways of compiling 2 programs. this should be unified Doesn't really matter diff --git a/monad.cpp b/monad.cpp index 48fa6e3ad4c35e0f8f63eac49a63d754d7adaeec..4a13484f46f7f417924ec1da5095f00295d3c939 100755 --- a/monad.cpp +++ b/monad.cpp @@ -79,6 +79,7 @@ int main(int argc, char ** argv) // Find monad/ directory find_base_dir(argv[0]); + // Read in local config settings. // Necessary to do this early for [SVN Root] url readConfig("./", config); @@ -88,6 +89,7 @@ int main(int argc, char ** argv) cout << "Testing " << name << "..." << endl << endl; cout << "Setting up test environment..." << endl; + output::set_error_message(); // Read in test-specific config settings if (mp_part == no_mp_part) diff --git a/monad_shared.cpp b/monad_shared.cpp index fe7ce823a72d7cfa6bc0cb3b3f424e4641cc2b62..eb9a908719f82d92239699f7e405a6b8c7125575 100755 --- a/monad_shared.cpp +++ b/monad_shared.cpp @@ -38,6 +38,13 @@ void printInfo() namespace output { +// Set EXIT_IF_ERROR message +void set_error_message() +{ + SET_ERROR_MESSAGE("Oops! Something went wrong inside of me.\n" + "Please contact course staff with the following error details, and they'll figure it out:\n"); +} + void header(const string & title) { cout << title << "..." << endl diff --git a/monad_shared.h b/monad_shared.h index d2c09800f1848a4bb8bfc55f4f0e8bf570040be7..78236b03097ac2df7995af5a20c9e143293676fb 100755 --- a/monad_shared.h +++ b/monad_shared.h @@ -59,6 +59,7 @@ namespace monad_shared namespace output { + void set_error_message(); void header(const std::string & title); void total_score(int32_t score); void warning(const std::string & message);