constructor(error, ps) {
        const isQueryFileError = error instanceof QueryFileError;
        const message = isQueryFileError ? 'Failed to initialize \'text\' from a QueryFile.' : error;
        super(message);
        this.name = this.constructor.name;
        if (isQueryFileError) {
            this.error = error;
        }
        this.result = ps;
        Error.captureStackTrace(this, this.constructor);
    }
@class errors.PreparedStatementError
@augments external:Error
@description
{@link errors.PreparedStatementError PreparedStatementError} class, available from the {@link errors} namespace.

This type represents all errors that can be reported by class {@link PreparedStatement}, whether it is used
explicitly or implicitly (via a simple `{name, text, values}` object).

@property {string} name
Standard {@link external:Error Error} property - error type name = `PreparedStatementError`.

@property {string} message
Standard {@link external:Error Error} property - the error message.

@property {string} stack
Standard {@link external:Error Error} property - the stack trace.

@property {errors.QueryFileError} error
Internal {@link errors.QueryFileError} object.

It is set only when the source {@link PreparedStatement} used a {@link QueryFile} which threw the error.

@property {object} result
Resulting Prepared Statement object.

@see PreparedStatement