Skip to content

Commit e541d12

Browse files
authored
Merge pull request #2092 from janhq/fix/exception_handling_by_ref
fix: Exception Handling and multiline comment
2 parents ce5cbe8 + 236beb7 commit e541d12

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

engine/common/message_content_text.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ struct Text : JsonSerializable {
192192
}
193193
json["annotations"] = annotations_json_arr;
194194
return json;
195-
} catch (const std::exception e) {
195+
} catch (const std::exception & e) {
196196
return cpp::fail(std::string("ToJson failed: ") + e.what());
197197
}
198198
};

engine/utils/hardware/gguf/gguf_file.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
#include "ggml.h"
2626
#include "utils/logging_utils.h"
2727
#include "utils/string_utils.h"
28-
29-
// #define GGUF_LOG(msg) \
30-
// do { \
31-
// std::cout << __FILE__ << "(@" << __LINE__ << "): " << msg << '\n'; \
32-
// } while (false)
28+
/*
29+
#define GGUF_LOG(msg) \
30+
do { \
31+
std::cout << __FILE__ << "(@" << __LINE__ << "): " << msg << '\n'; \
32+
} while (false)
33+
*/
3334

3435
#define GGUF_LOG(msg)
3536
namespace hardware {

0 commit comments

Comments
 (0)