| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c101b39 commit 4c9c1bb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -77,8 +77,13 @@ void NodeTraceWriter::OpenNewFileForStreaming() { | |||
| 77 | 77 | ||
| 78 | 78 | fd_ = uv_fs_open(tracing_loop_, &req, filepath.c_str(), | |
| 79 | 79 | O_CREAT | O_WRONLY | O_TRUNC, 0644, nullptr); | |
| 80 | - CHECK_NE(fd_, -1); | ||
| 81 | 80 | uv_fs_req_cleanup(&req); | |
| 81 | + if (fd_ < 0) { | ||
| 82 | + fprintf(stderr, "Could not open trace file %s: %s\n", | ||
| 83 | + filepath.c_str(), | ||
| 84 | + uv_strerror(fd_)); | ||
| 85 | + fd_ = -1; | ||
| 86 | + } | ||
| 82 | 87 | } | |
| 83 | 88 | ||
| 84 | 89 | void NodeTraceWriter::AppendTraceEvent(TraceObject* trace_event) { | |
@@ -145,6 +150,7 @@ void NodeTraceWriter::Flush(bool blocking) { | |||
| 145 | 150 | } | |
| 146 | 151 | ||
| 147 | 152 | void NodeTraceWriter::WriteToFile(std::string&& str, int highest_request_id) { | |
| 153 | + if (fd_ == -1) return; | ||
| 148 | 154 | WriteRequest* write_req = new WriteRequest(); | |
| 149 | 155 | write_req->str = std::move(str); | |
| 150 | 156 | write_req->writer = this; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments