diff --git a/src/LAMMPS.jl b/src/LAMMPS.jl index 30725f1..7c40a20 100644 --- a/src/LAMMPS.jl +++ b/src/LAMMPS.jl @@ -102,7 +102,7 @@ end function LAMMPSError(lmp::LMP) buf = zeros(UInt8, 100) API.lammps_get_last_error_message(lmp, buf, length(buf)) - LAMMPSException(String(buf)) + LAMMPSError(String(buf)) end function Base.showerror(io::IO, err::LAMMPSError) diff --git a/test/runtests.jl b/test/runtests.jl index 061cc69..1e1e544 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -12,7 +12,7 @@ LMP(["-screen", "none"]) do lmp @test LAMMPS.version(lmp) >= 0 command(lmp, "clear") - @test_throws ErrorException command(lmp, "nonsense") + @test_throws LAMMPS.LAMMPSError command(lmp, "nonsense") end @testset "Variables" begin