Skip to content

Commit 5598f47

Browse files
authored
server : remove CPPHTTPLIB_NO_EXCEPTIONS define (#11622)
This commit removes the CPPHTTPLIB_NO_EXCEPTIONS define from the server code. The motivation for this is that when using a debug build the server would crash when an exception was throws and terminate the server process, as it was unhandled. When CPPHTTPLIB_NO_EXCEPTIONS is set cpp_httplib will not call the exception handler, which would normally return a 500 error to the client. This caused tests to fail when using a debug build. Fixes: #11613
1 parent 8ec0583 commit 5598f47

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

examples/server/utils.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
#include "llama.h"
66
#include "common/base64.hpp"
77

8-
#ifndef NDEBUG
9-
// crash the server in debug mode, otherwise send an http 500 error
10-
#define CPPHTTPLIB_NO_EXCEPTIONS 1
11-
#endif
128
// increase max payload length to allow use of larger context size
139
#define CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH 1048576
1410
#include "httplib.h"

0 commit comments

Comments
 (0)