Skip to content

Commit

Permalink
runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Nov 5, 2024
1 parent 912e31f commit 367fb0e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
6 changes: 4 additions & 2 deletions include/get.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ std::string getEvds(const std::string &url, const Config &config)
}
catch (const std::exception &ex)
{
std::cerr << "Error: " << ex.what() << std::endl;
// std::cerr << "Error: " << ex.what() << std::endl;
}
return nullptr;
throw std::runtime_error("Request was cancelled");
// return nullptr;
return "";
}
5 changes: 2 additions & 3 deletions include/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using json = nlohmann::json;
namespace evds
{

// Utility function for printing a vector

template <typename T>
void print_v(const T &v)
{
Expand All @@ -24,8 +24,7 @@ namespace evds
std::cout << std::endl;
}

// struct GetParams;
// Utility function for printing a single value

template <typename T>
void prints(const T &x)
{
Expand Down
2 changes: 1 addition & 1 deletion include/index.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace evds

string_v fromVector(const string_v &tmpl)
{
// TODO it may be better with some cleaining and converting uppercase

return tmpl;
}
Expand Down
7 changes: 3 additions & 4 deletions include/shorten.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ int mainAA()
return 0;
}

// Helper function to capitalize the first letter of each word
std::string capitalizeWords(const std::string &input)
{
std::string result;
Expand All @@ -65,7 +64,7 @@ std::string capitalizeWords(const std::string &input)
for (char c : input)
{
if (std::isalnum(c))
{ // Process alphanumeric characters only
{
if (capitalizeNext)
{
result += std::toupper(c);
Expand All @@ -78,13 +77,13 @@ std::string capitalizeWords(const std::string &input)
}
else
{
capitalizeNext = true; // Reset on non-alphanumeric characters
capitalizeNext = true;
}
}
return result;
}

// Function to generate a short, concise filename
std::string getShortFilename(const std::string &input)
{

Expand Down
3 changes: 1 addition & 2 deletions include/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ namespace evds
bool verbose = false;
std::string start_date = "01-01-2000";
std::string end_date = "31-12-2100";
// std::string frequency = "daily";
// std::string aggregation = "none";

bool test = false;
std::string frequency = "default"; // daily | monthly | weekly | annually | semimonthly | semiannually | business
std::string formulas = "default"; // | level | percentage_change | difference | year_to_year_percent_change | year_to_year_differences |
Expand Down

0 comments on commit 367fb0e

Please sign in to comment.