You are here

protected function S3fsStreamWrapper::_trigger_error in S3 File System 7.2

Same name and namespace in other branches
  1. 7.3 S3fsStreamWrapper.inc \S3fsStreamWrapper::_trigger_error()
  2. 7 S3fsStreamWrapper.inc \S3fsStreamWrapper::_trigger_error()

Triggers one or more errors.

Parameters

string|array $errors: Errors to trigger.

mixed $flags: If set to STREAM_URL_STAT_QUIET, no error or exception is triggered.

Return value

bool Always returns FALSE.

Throws

RuntimeException If the 'throw_exceptions' option is TRUE.

6 calls to S3fsStreamWrapper::_trigger_error()
S3fsStreamWrapper::rename in ./S3fsStreamWrapper.inc
Support for rename().
S3fsStreamWrapper::rmdir in ./S3fsStreamWrapper.inc
Support for rmdir().
S3fsStreamWrapper::stream_flush in ./S3fsStreamWrapper.inc
Support for fflush(). Flush current cached stream data to a file in S3.
S3fsStreamWrapper::stream_open in ./S3fsStreamWrapper.inc
Support for fopen(), file_get_contents(), file_put_contents() etc.
S3fsStreamWrapper::unlink in ./S3fsStreamWrapper.inc
Support for unlink().

... See full list

File

./S3fsStreamWrapper.inc, line 1534
Drupal stream wrapper implementation for S3 File System.

Class

S3fsStreamWrapper
The stream wrapper class.

Code

protected function _trigger_error($errors, $flags = NULL) {
  if ($flags != STREAM_URL_STAT_QUIET) {
    if ($this
      ->_get_option('throw_exceptions')) {
      throw new RuntimeException(implode("\n", (array) $errors));
    }
    else {
      trigger_error(implode("\n", (array) $errors), E_USER_ERROR);
    }
  }
  $this->_error_state = TRUE;
  return FALSE;
}