Laravel: The BEST way to handle exceptions

  Рет қаралды 13,702

Przemysław Przyłucki

Przemysław Przyłucki

Жыл бұрын

Hi guys!
In this episode we'll talk about exceptions and how we can make our life easier by utilizing custom exceptions

Пікірлер: 19
@JohnSmithhh
@JohnSmithhh 3 ай бұрын
BEST video on the subject! Thanks for the time saved!
@okhaeadeleye2386
@okhaeadeleye2386 8 ай бұрын
Thank you. Short and sweet.
@stefangadjev1310
@stefangadjev1310 Жыл бұрын
Bro, thats insanely good idea.
@grzesiekb9142
@grzesiekb9142 Жыл бұрын
Dobra robota, człowiek zawsze się czegoś dowie od bardziej doświadczonych ludzi 😊. Zawsze uzywałem try-catch…
@AbderrahmanFodili
@AbderrahmanFodili 2 ай бұрын
Amazing stuff. I did sth weird to handle this . I added a helper method that returned an array with the key being the"Exception::class" and the value being either an array or a closure that returns an array as well this array always has a code and a message . this way I managed to also handle Laravel's own exceptions but your way of doing it is the Laravel way through the register method
@zachariascreutznacher3093
@zachariascreutznacher3093 Жыл бұрын
Really like your videos, very good content!
@kareemlateefyomi8690
@kareemlateefyomi8690 10 ай бұрын
After registering the custom exception in register method of exception handler, the exception keeps returning the default laravel server error
@gazorbpazorbian
@gazorbpazorbian Жыл бұрын
this video is really great!
@saaslaravel
@saaslaravel Жыл бұрын
Thank you so much!
@alexz75515
@alexz75515 11 ай бұрын
Although I like this way of structuring exceptions, with multiple static returns per class. Clean and short. I found few minor caveats: - in tests you may need to target exception code or message in addition to class name to assert the exact method thrown. - same thing in Laravel exception handler, if you need to target particular static method.
@saaslaravel
@saaslaravel 11 ай бұрын
That's very true. There is a nice solution to it though! Video about it is in the pipeline ;)
@youtube-youtube721
@youtube-youtube721 9 ай бұрын
When do you release the video you mentioned above?
@saaslaravel
@saaslaravel 9 ай бұрын
​@@youtube-youtube721next week 😁
@thyagobrasileiro3784
@thyagobrasileiro3784 4 ай бұрын
Can you help me, the register function is not been called on Handle.php. I search and i found nothing about. I put a dd but never go there.
@MadukaJayalath
@MadukaJayalath Жыл бұрын
The sound is bit low but great content!
@DougLopes
@DougLopes 3 ай бұрын
I love your channel and content, but its almost impossible remember your channel name when i want rewatch some video as a brazillian, have you considered rename the channel for something more acessible since your content is global?
@abdulsalamamtech
@abdulsalamamtech 2 ай бұрын
That's a good notice. I also find it difficult to pronoun or type.
@dmitriykret8938
@dmitriykret8938 Жыл бұрын
👍
@NedumEze
@NedumEze Жыл бұрын
Great idea. But, you didn't consider that some of your audience may not be any where as good as you, and therefore simplify more and slowly. Still, thank you very much. I may not be able to replicate what you've done!
Exceptions in Laravel: Why/How to Use and Create Your Own
12:18
Laravel Daily
Рет қаралды 86 М.
Refactor "Senior" PHP Code with Early Returns
12:09
Laravel Daily
Рет қаралды 25 М.
How many pencils can hold me up?
00:40
A4
Рет қаралды 18 МЛН
Can you beat this impossible game?
00:13
LOL
Рет қаралды 44 МЛН
어른의 힘으로만 할 수 있는 버블티 마시는법
00:15
진영민yeongmin
Рет қаралды 8 МЛН
100😭🎉 #thankyou
00:28
はじめしゃちょー(hajime)
Рет қаралды 37 МЛН
JavaScript Error Handling: 5 Things You Aren’t Thinking About!
14:42
Laravel: Avoid Try-Catch In Every Method (What To Do Instead)
4:45
Laravel Daily
Рет қаралды 27 М.
Advanced Laravel: Service Container & Providers (Primitives)
6:06
Jordan Dalton
Рет қаралды 3,8 М.
Laravel app can't possibly be THIS good... [Free course: Great Laravel Apps #2]
34:44
What is Laravel Octane?
8:34
Aaron Francis
Рет қаралды 28 М.
Top 5 Laravel "Bad Practices" (My Opinion)
10:32
Laravel Daily
Рет қаралды 16 М.
Laravel: Repository Pattern in practice
27:13
Przemysław Przyłucki
Рет қаралды 10 М.
Simple Custom Laravel Logging
7:50
Codecourse
Рет қаралды 27 М.
Mi primera placa con dios
0:12
Eyal mewing
Рет қаралды 363 М.
Цифровые песочные часы с AliExpress
0:45
Куда пропал 3D Touch? #apple #iphone
0:51
Не шарю!
Рет қаралды 780 М.
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 9 МЛН
Nokia 3310 versus Red Hot Ball
0:37
PressTube
Рет қаралды 3,8 МЛН