message: Add PoolError::InvalidState.
diff: @@ -12,6 +12,7 @@ use errors::ToErrorCode;
  #[derive(Debug)]
  pub enum PoolError {
  NotCreated(String),
  + InvalidState(String),
  InvalidData(String),
  InvalidConfiguration(String),
  InvalidHandle(String),
  @@ -22,6 +23,7 @@ impl fmt::Display for PoolError {
  fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
  match *self {
  PoolError::NotCreated(ref description) => write!(f, "Not created: {}", description),
  + PoolError::InvalidState(ref description) => write!(f, "Internal error: {}", description),
  PoolError::InvalidHandle(ref description) => write!(f, "Invalid Handle: {}", description),
  PoolError::InvalidConfiguration(ref description) => write!(f, "Invalid configuration: {}", description),
  PoolError::InvalidData(ref description) => write!(f, "Invalid data: {}", description),
  @@ -33,9 +35,10 @@ impl fmt::Display for PoolError {
  impl error::Error for PoolError {
  fn description(&self) -> &str {
  match *self {
  - PoolError::NotCreated(ref description) => description,
  - PoolError::InvalidHandle(ref description) => description,
  - PoolError::InvalidData(ref description) => description,
  + PoolError::NotCreated(ref description) |
  + PoolError::InvalidState(ref description) |
  + PoolError::InvalidHandle(ref description) |
  + PoolError::InvalidData(ref description) |
  PoolError::InvalidConfiguration(ref description) => description,
  PoolError::Io(ref err) => err.description()
  }
  @@ -43,9 +46,10 @@ impl error::Error for PoolError {
  fn cause(&self) -> Option<&error::Error> {
  match *self {
  - PoolError::NotCreated(ref description) => None,
  - PoolError::InvalidHandle(ref description) => None,
  - PoolError::InvalidData(ref description) => None,
  + PoolError::NotCreated(ref description) |
  + PoolError::InvalidState(ref description) |
  + PoolError::InvalidHandle(ref description) |
  + PoolError::InvalidData(ref description) |
  PoolError::InvalidConfiguration(ref description) => None,
  PoolError::Io(ref err) => Some(err)
  }
  @@ -74,6 +78,7 @@ impl ToErrorCode for PoolError {
  fn to_error_code(&self) -> ErrorCode {
  match *self {
  PoolError::NotCreated(ref description) => ErrorCode::PoolLedgerNotCreatedError,
  + PoolError::InvalidState(ref description) => ErrorCode::CommonInvalidState,
  PoolError::InvalidConfiguration(ref description) => ErrorCode::PoolLedgerInvalidConfiguration,
  PoolError::InvalidHandle(ref description) => ErrorCode::PoolLedgerInvalidPoolHandle,
  PoolError::InvalidData(ref description) => ErrorCode::PoolLedgerInvalidDataFormat,
  