httplib may throw on invalid protocol.

This commit is contained in:
Bartosz Taudul
2025-07-12 11:49:54 +02:00
parent 4c7338ec1e
commit 3a4786d2be
+10 -2
View File
@@ -15,8 +15,16 @@ TracyLlm::TracyLlm()
{
if( !s_config.llm ) return;
m_ollama = std::make_unique<Ollama>( s_config.llmAddress );
if( !m_ollama->is_running() )
try
{
m_ollama = std::make_unique<Ollama>( s_config.llmAddress );
if( !m_ollama->is_running() )
{
m_ollama.reset();
return;
}
}
catch( const std::exception& e )
{
m_ollama.reset();
return;