CA-152164: Fix raising PygrubError exceptions

Pass the arguments to the exception as a constructor rather than
using the older form of the raise statement.