Skip to content

Commit c955b2c

Browse files
authoredMay 22, 2019
Merge pull request #664 from jan-stanek/logovani
logovani vyjimek
2 parents 8556c92 + 0dca1f6 commit c955b2c

File tree

10 files changed

+32
-8
lines changed

10 files changed

+32
-8
lines changed
 

‎app/AdminModule/ConfigurationModule/forms/BankForm.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
use Nette;
1717
use Nette\Application\UI\Form;
1818
use Nextras\Forms\Controls\DatePicker;
19+
use Tracy\Debugger;
20+
use Tracy\ILogger;
1921

2022
/**
2123
* Formulár pro nastavení párování plateb.
@@ -90,7 +92,8 @@ public function processForm(Form $form, \stdClass $values) : void
9092
try {
9193
$this->bankService->downloadTransactions($from, $token);
9294
$this->settingsRepository->setValue(Settings::BANK_TOKEN, $token);
93-
} catch (InternalErrorException $e) {
95+
} catch (InternalErrorException $ex) {
96+
Debugger::log($ex, ILogger::WARNING);
9497
$form['bankToken']->addError('admin.configuration.payment.bank.invalid_token');
9598
}
9699
}

‎app/AdminModule/MailingModule/forms/SendForm.php

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use Nette;
1616
use Nette\Application\UI\Form;
1717
use Nette\Mail\SendException;
18+
use Tracy\Debugger;
19+
use Tracy\ILogger;
1820
use Ublaboo\Mailing\Exception\MailingException;
1921
use Ublaboo\Mailing\Exception\MailingMailCreationException;
2022

@@ -141,6 +143,7 @@ public function processForm(Form $form, \stdClass $values) : void
141143
$this->mailService->sendMail($recipientsRoles, $recipientsSubevents, $recipientsUsers, $values['copy'], $values['subject'], $values['text']);
142144
$this->mailSuccess = true;
143145
} catch (SendException $ex) {
146+
Debugger::log($ex, ILogger::WARNING);
144147
$this->mailSuccess = false;
145148
}
146149
}

‎app/AdminModule/ProgramModule/components/ProgramBlocksGridControl.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
use Nette\Http\Session;
2828
use Nette\Http\SessionSection;
2929
use PhpOffice\PhpSpreadsheet\Exception;
30+
use Tracy\Debugger;
31+
use Tracy\ILogger;
3032
use Ublaboo\DataGrid\DataGrid;
3133
use Ublaboo\DataGrid\Exception\DataGridColumnStatusException;
3234
use Ublaboo\DataGrid\Exception\DataGridException;
@@ -263,7 +265,8 @@ public function changeMandatory(int $id, string $mandatory) : void
263265
try {
264266
$this->programService->updateBlockMandatory($block, $mandatory);
265267
$p->flashMessage('admin.program.blocks_changed_mandatory', 'success');
266-
} catch (\Throwable $e) {
268+
} catch (\Throwable $ex) {
269+
Debugger::log($ex, ILogger::WARNING);
267270
$p->flashMessage('admin.program.blocks_change_mandatory_error', 'danger');
268271
}
269272
}

‎app/WebModule/forms/ApplicationForm.php

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
use function array_keys;
4646
use function count;
4747
use function in_array;
48+
use Tracy\Debugger;
49+
use Tracy\ILogger;
4850

4951
/**
5052
* Formulář přihlášky.
@@ -343,6 +345,7 @@ public function processForm(Form $form, \stdClass $values) : void
343345
$this->user->getState()
344346
);
345347
} catch (WsdlException $ex) {
348+
Debugger::log($ex, ILogger::WARNING);
346349
$this->onSkautIsError();
347350
}
348351

‎app/WebModule/forms/PersonalDetailsForm.php

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
use Nette\Application\UI\Form;
1616
use Skautis\Wsdl\WsdlException;
1717
use function array_key_exists;
18+
use Tracy\Debugger;
19+
use Tracy\ILogger;
1820

1921
/**
2022
* Formulář pro úpravu osobních údajů.
@@ -172,6 +174,7 @@ public function processForm(Form $form, \stdClass $values) : void
172174
$this->user->getState()
173175
);
174176
} catch (WsdlException $ex) {
177+
Debugger::log($ex, ILogger::WARNING);
175178
$this->onSkautIsError();
176179
}
177180
}

‎app/commands/ClearCacheCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
6868

6969
$output->writeln('Cache cleared.');
7070
return 0;
71-
} catch (\Throwable $exc) {
71+
} catch (\Throwable $ex) {
7272
$output->write('error');
7373
return 1;
7474
}

‎app/services/DiscountService.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function countDiscount(array $selectedSubeventsIds) : int
7676

7777
try {
7878
$this->parseExpression($result);
79-
} catch (InvalidArgumentException $exception) {
79+
} catch (InvalidArgumentException $ex) {
8080
continue;
8181
}
8282

@@ -101,7 +101,7 @@ public function validateCondition(string $condition) : bool
101101

102102
try {
103103
$this->parseExpression($result);
104-
} catch (InvalidArgumentException $exception) {
104+
} catch (InvalidArgumentException $ex) {
105105
return false;
106106
}
107107

‎app/services/SkautIsEventEducationService.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
use Skautis\Skautis;
1212
use Skautis\Wsdl\WsdlException;
1313
use function array_key_exists;
14+
use Tracy\Debugger;
15+
use Tracy\ILogger;
1416

1517
/**
1618
* Služba pro správu vzdělávací skautIS akce.
@@ -76,7 +78,8 @@ public function insertParticipants(int $eventId, Collection $users, bool $accept
7678
}
7779
}
7880
}
79-
} catch (WsdlException $e) {
81+
} catch (WsdlException $ex) {
82+
Debugger::log($ex, ILogger::WARNING);
8083
return false;
8184
}
8285

‎app/services/SkautIsEventGeneralService.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use Doctrine\Common\Collections\Collection;
99
use Skautis\Wsdl\WsdlException;
1010
use function array_key_exists;
11+
use Tracy\Debugger;
12+
use Tracy\ILogger;
1113

1214
/**
1315
* Služba pro správu obecné skautIS akce.
@@ -44,7 +46,8 @@ public function insertParticipants(int $eventId, Collection $users, bool $accept
4446

4547
$this->insertParticipant($eventId, $personId);
4648
}
47-
} catch (WsdlException $e) {
49+
} catch (WsdlException $ex) {
50+
Debugger::log($ex, ILogger::WARNING);
4851
return false;
4952
}
5053

‎app/services/SkautIsEventService.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use Doctrine\Common\Collections\Collection;
99
use Skautis\Skautis;
1010
use Skautis\Wsdl\WsdlException;
11+
use Tracy\Debugger;
12+
use Tracy\ILogger;
1113

1214
/**
1315
* Služba pro správu skautIS akce.
@@ -67,7 +69,8 @@ public function getEventsOptions() : array
6769
foreach ($this->getDraftEvents() as $event) {
6870
$options[$event->ID] = $event->DisplayName;
6971
}
70-
} catch (WsdlException $e) {
72+
} catch (WsdlException $ex) {
73+
Debugger::log($ex, ILogger::WARNING);
7174
}
7275
return $options;
7376
}

0 commit comments

Comments
 (0)
Please sign in to comment.