You are here

public function AppService::error in Forena Reports 8

General wrapper procedure for reporting erros

Parameters

string $short_message Message that will be displayed to the users:

string $log Message that will be recorded in the logs.:

1 method overrides AppService::error()
TestingAppService::error in tests/src/Unit/Mock/TestingAppService.php
General wrapper procedure for reporting erros

File

src/AppService.php, line 267

Class

AppService

Namespace

Drupal\forena

Code

public function error($short_message = '', $log = '') {
  if ($short_message) {
    drupal_set_message($short_message, 'error', FALSE);
  }
  if ($log) {
    \Drupal::logger('forena')
      ->error($log);
  }
}