diff --git a/src/CaosDB.jl b/src/CaosDB.jl index e67b91bd1a02fe02bdd05cebd3ad961f742344fa..a436134a2ef7709a6608931ba82409b7f07f4031 100644 --- a/src/CaosDB.jl +++ b/src/CaosDB.jl @@ -63,7 +63,7 @@ function evaluate_return_code(code::Cint) (:caosdb_get_status_description, CaosDB.library_name), Cstring, (Cint,), - code + code, ) throw(GenericCaosDBException(unsafe_string(msg), code)) end @@ -180,7 +180,7 @@ function create_plain_password_authenticator( ) CaosDB.Excepions.evaluate_return_code(err_code) - + return auth end diff --git a/src/Connection.jl b/src/Connection.jl index 78e8b3b5f8c2970604eba28c79b5d14bfab1147e..ec26b66d3fba58cc90f98b6b962a00673bda7bca 100644 --- a/src/Connection.jl +++ b/src/Connection.jl @@ -135,7 +135,7 @@ function create_pem_file_certificate_provider(path::AbstractString) ) CaosDB.Excepions.evaluate_return_code(err_code) - + return cert_provider end @@ -175,9 +175,9 @@ function create_tls_connection_configuration( authenticator, provider, ) - + CaosDB.Excepions.evaluate_return_code(err_code) - + return config end @@ -249,7 +249,7 @@ function get_connection(name::AbstractString = "default") end CaosDB.Excepions.evaluate_return_code(err_code) - + return connection end diff --git a/test/runtests.jl b/test/runtests.jl index fadbe268cd7b8395031eb98f265f2d3182d2bbfd..48b7826e911f6dddcf57f1872509868b90eded78 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -32,10 +32,14 @@ using CaosDB end @test CaosDB.Utility.get_env_var("SHELL", "default") == shell_var end - + @testset "TestExceptions" begin @test CaosDB.Exceptions.evaluate_return_code(Cint(0)) == nothing - @test_throws CaosDB.Exceptions.CaosDBException CaosDB.Exceptions.evaluate_return_code(Cint(14)) - @test_throws CaosDB.Exceptions.GenericCaosDBException CaosDB.Exceptions.evaluate_return_code(Cint(14)) + @test_throws CaosDB.Exceptions.CaosDBException CaosDB.Exceptions.evaluate_return_code( + Cint(14), + ) + @test_throws CaosDB.Exceptions.GenericCaosDBException CaosDB.Exceptions.evaluate_return_code( + Cint(14), + ) end end