Skip to content

Commit

Permalink
[Geneva Exporter] Allocate exception from stack instead of heap (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Jul 20, 2024
1 parent d953d32 commit 10f769b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static inline bool InitializeGenevaExporter( const GenevaExporterOptions options
return true;
} else {
#if defined(__EXCEPTIONS)
throw new std::runtime_error("Invalid endpoint! Unix domain socket should have unix:// as url-scheme");
throw std::runtime_error("Invalid endpoint! Unix domain socket should have unix:// as url-scheme");
#endif
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static inline bool InitializeGenevaExporter( const GenevaExporterOptions options
return true;
} else {
#if defined(__EXCEPTIONS)
throw new std::runtime_error("Invalid endpoint! Unix domain socket should have unix:// as url-scheme");
throw std::runtime_error("Invalid endpoint! Unix domain socket should have unix:// as url-scheme");
#endif
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion exporters/fluentd/src/log/fluentd_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ bool FluentdExporter::Initialize() {
else {
#if defined(__EXCEPTIONS)
// Customers MUST specify valid end-point configuration
throw new std::runtime_error("Invalid endpoint!");
throw std::runtime_error("Invalid endpoint!");
#endif
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion exporters/fluentd/src/trace/fluentd_exporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ bool FluentdExporter::Initialize() {
else {
#if defined(__EXCEPTIONS)
// Customers MUST specify valid end-point configuration
throw new std::runtime_error("Invalid endpoint!");
throw std::runtime_error("Invalid endpoint!");
#endif
return false;
}
Expand Down

0 comments on commit 10f769b

Please sign in to comment.