Skip to content

Commit

Permalink
[EN-7587] Implement FetchDailyCandles sample
Browse files Browse the repository at this point in the history
JavaException::create
  • Loading branch information
AnatolyKalin committed Jun 25, 2024
1 parent 04c38da commit a1cf71f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/exceptions/JavaException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void JavaException::throwIfJavaThreadExceptionExists() {
},
exception);

throw javaException;
throw javaException; // NOLINT(*-throw-by-value-catch-by-reference)
}

void JavaException::throwException() {
Expand Down Expand Up @@ -96,14 +96,14 @@ JavaException::JavaException(const std::string &message, const std::string &clas
stackTrace_{std::move(stackTrace) + "\n" + stackTraceToString(boost::stacktrace::stacktrace())} {
}

JavaException JavaException::create(void* exceptionHandle) {
JavaException JavaException::create(void *exceptionHandle) {
if (exceptionHandle == nullptr) {
return JavaException("", "", "");
return {"", "", ""};
}

dxfg_exception_t *exception = dxfcpp::bit_cast<dxfg_exception_t*>(exceptionHandle);
auto *exception = dxfcpp::bit_cast<dxfg_exception_t *>(exceptionHandle);

return JavaException(toString(exception->message), toString(exception->class_name), toString(exception->print_stack_trace));
return {toString(exception->message), toString(exception->class_name), toString(exception->print_stack_trace)};
}

const std::string &JavaException::getStackTrace() const & {
Expand Down

0 comments on commit a1cf71f

Please sign in to comment.