Preempt Session.execute/prepare queries with exception if Session was closed

Description

When submitting a query via Session.execute, Session.prepare, etc. we should check to see if the Session was previously closed first and throw an exception indicating if that is the case. I believe today the logic continues and throws a NoHostAvailableException which doesn't make it clear that the Session or associated Cluster was closed.

Environment

None

Pull Requests

None
Fixed

Assignee

Greg Bestland

Reporter

Andy Tolbert

Labels

None

PM Priority

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Major
Configure