Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Jan 8, 2024
1 parent 64a1365 commit 2b45426
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nthPrime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ uint64_t PrimeSieve::nthPrime(int64_t n, uint64_t start)
{
prime = iter.prev_prime();
if_unlikely(prime == 0)
throw primesieve_error("nth_prime(n): n is too small, nth_prime(n) < 2!");
throw primesieve_error("nth_prime(n): invalid n, nth prime < 2 is impossible!");
}
}

Expand Down Expand Up @@ -166,7 +166,7 @@ uint64_t PrimeSieve::negativeNthPrime(int64_t n, uint64_t start)
{
prime = iter.prev_prime();
if_unlikely(prime == 0)
throw primesieve_error("nth_prime(n): n is too small, nth_prime(n) < 2!");
throw primesieve_error("nth_prime(n): invalid n, nth prime < 2 is impossible!");
}
}

Expand Down

0 comments on commit 2b45426

Please sign in to comment.