Skip to content

Commit

Permalink
Log non-fatal errors in Visualizer as warnings instead of errors (#2579)
Browse files Browse the repository at this point in the history
  • Loading branch information
errissa authored Nov 5, 2020
1 parent a5c9e2d commit b6cf739
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cpp/open3d/visualization/visualizer/Visualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class GLFWEnvironmentSingleton {
}

static void GLFWErrorCallback(int error, const char *description) {
utility::LogError("GLFW Error: {}", description);
utility::LogWarning("GLFW Error: {}", description);
}
};

Expand Down
10 changes: 5 additions & 5 deletions cpp/open3d/visualization/visualizer/VisualizerRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void Visualizer::Render(bool render_screen) {

if (render_screen) {
if (render_fbo_ != 0) {
utility::LogError("Render framebuffer is not released.");
utility::LogWarning("Render framebuffer is not released.");
}

glGenFramebuffers(1, &render_fbo_);
Expand Down Expand Up @@ -145,13 +145,13 @@ void Visualizer::ResetViewPoint(bool reset_bounding_box /* = false*/) {
void Visualizer::CopyViewStatusToClipboard() {
ViewParameters current_status;
if (!view_control_ptr_->ConvertToViewParameters(current_status)) {
utility::LogError("Something is wrong copying view status.");
utility::LogWarning("Something is wrong copying view status.");
}
ViewTrajectory trajectory;
trajectory.view_status_.push_back(current_status);
std::string clipboard_string;
if (!io::WriteIJsonConvertibleToJSONString(clipboard_string, trajectory)) {
utility::LogError("Something is wrong copying view status.");
utility::LogWarning("Something is wrong copying view status.");
}
glfwSetClipboardString(window_, clipboard_string.c_str());
}
Expand All @@ -163,10 +163,10 @@ void Visualizer::CopyViewStatusFromClipboard() {
ViewTrajectory trajectory;
if (!io::ReadIJsonConvertibleFromJSONString(clipboard_string,
trajectory)) {
utility::LogError("Something is wrong copying view status.");
utility::LogWarning("Something is wrong copying view status.");
}
if (trajectory.view_status_.size() != 1) {
utility::LogError("Something is wrong copying view status.");
utility::LogWarning("Something is wrong copying view status.");
}
view_control_ptr_->ConvertFromViewParameters(
trajectory.view_status_[0]);
Expand Down

0 comments on commit b6cf739

Please sign in to comment.