Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Nov 15, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent da45b6c commit 8aa6a5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/pq/connection.cpp
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@

#include <cctype>
#include <cstring>
#include <format>
#include <memory>
#include <stdexcept>
#include <string>
@@ -190,7 +191,7 @@ namespace tao::pq
void connection::check_prepared_name( const std::string_view name )
{
if( !internal::is_identifier( name ) ) {
throw std::invalid_argument( "invalid prepared statement name" );
throw std::invalid_argument( std::format( "invalid prepared statement name: {}", name ) );
}
}

0 comments on commit 8aa6a5a

Please sign in to comment.