OOP Error Handling In PHP - Exceptions & Try Catch Finally Blocks - Full PHP 8 Tutorial

OOP Error Handling In PHP - Exceptions & Try Catch Finally Blocks - Full PHP 8 Tutorial

Program With Gio

3 года назад

30,369 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@Rimtay
@Rimtay - 06.12.2023 21:31

Awesome🎉

Ответить
@ilya_123__
@ilya_123__ - 28.11.2023 09:05

thank you!

Ответить
@acuteclub7381
@acuteclub7381 - 14.09.2023 00:43

bravo, very well explained.... you should be teaching it, keep up the good work and thanks a lot for the effort

Ответить
@user-zh2oz9fe4m
@user-zh2oz9fe4m - 16.08.2023 14:31

This is by far the best PHP course. Thanks!

Ответить
@Armando-px8hi
@Armando-px8hi - 24.07.2023 01:03

Honestly by making this course everyone who is gonna watch it will make it to the pro. There are many many courses for money but all they explain is just basic knowledge and 4 fundamental concepts of OOP. I have never known about autoloading for example and so much more. Thank you GIO. May GOD BLESS YOU.

Ответить
@asdasx392
@asdasx392 - 28.06.2023 18:38

I have been programming for 30 years and got throw onto a PHP project with no prior experience in the language. These are probably the best programming tutorials I have seen. Very fast paced and all the right information.

Ответить
@sym2574
@sym2574 - 09.06.2023 22:40

Should I write exceptions in the whole program?

Ответить
@NedumEze
@NedumEze - 04.06.2023 20:03

Hi Gio,
Sorry to trouble you, please.
May I ask, how do you use the Static Exceptions in try/catch blocks?
I have a Database Class, say,
In the Constructor, I have this:

try
{
$this->pdo = new PDO (......);
} catch (DatabaseException $e)
{
????
}

In my DatabaseException Class, I have:

Public static function ConnectionFailureException() which returns new static('.....');

Ответить
@apl1mhd
@apl1mhd - 22.05.2023 19:52

Pure gold, take a love ❤

Ответить
@emekatimothyiloba699
@emekatimothyiloba699 - 19.05.2023 05:00

Thank you Once Again Gio

Ответить
@emekatimothyiloba699
@emekatimothyiloba699 - 31.03.2023 08:33

Nice

Ответить
@truthteachers
@truthteachers - 23.02.2023 02:12

Bro, this is the best and detail explanation on PHP exceptions. Now i know i could throw my own custom exceptions for database access errors. Only thing is my old complain - too fast. But its ok, i repeat the portion in slow speed.

Ответить
@truthteachers
@truthteachers - 23.02.2023 02:08

Thanks

Ответить
@mwaas
@mwaas - 13.01.2023 19:37

All instructors who present courses on Udemy and Coursera ...... ,should learn from you how to explain all the things and details( not just the basic stuff) in a simple and accurate way.

Ответить
@judeleon8485
@judeleon8485 - 26.12.2022 16:59

This is so for the most detailed tutorial on Exception I have come across. Thanks a million

Ответить
@mikulcek
@mikulcek - 23.12.2022 23:30

Your work is careful crafted.

Ответить
@user-mo3cw6go7c
@user-mo3cw6go7c - 23.12.2022 15:02

Very informative very enriching very helpful, thanks for this awesome tutorial!

Ответить
@benjaminvenezia1944
@benjaminvenezia1944 - 09.12.2022 13:50

Gio is the ultimate argument against the bearded ones who criticize the use of tutorials for learning.
I'm waiting for the Laravel tutorial as a Christmas present.

Ответить
@bijianwu5124
@bijianwu5124 - 10.11.2022 03:05

thanks for the time and effort you put into making this remarkable content!

Ответить
@gustavomanzano3360
@gustavomanzano3360 - 01.11.2022 17:45

I made the same as you: Try/Catch blocks with my custom exception class who is an extension of the generic exception class, but it's not working
i received an global errorhandler message instead of the exception of my custom class... i dont get how it should work...

Ответить
@sefyankehail7801
@sefyankehail7801 - 23.10.2022 20:52

First of all thank you so much for everything.
I just have a question regarding the last part of the video where you used static methods, I just wanna know the reason behind using late static binding in the return statements ( return new static('Missing billing info'); ), is it because maybe we will use another class that extends the InvoiceException class, or there is another reason for that ? new self would also be fine here right ?

Ответить
@BubblegumSoup
@BubblegumSoup - 27.08.2022 14:33

good channel, talks a bit slow though…

Ответить
@memack101
@memack101 - 16.08.2022 04:26

Thank you.

Ответить
@karamm3353
@karamm3353 - 10.08.2022 10:04

I hit the thumbs up before watching, thank you bro

Ответить
@photoshopologi1445
@photoshopologi1445 - 09.08.2022 19:11

thats great but pleassse talk slower

Ответить
@Zubbee
@Zubbee - 01.06.2022 20:24

Great lesson. First exposure to this kind of error handling. I certainly need to explore it more... later. I need to move on, want to get to the end of section 2. Thanks a lot Gio

Ответить
@devonmclean4337
@devonmclean4337 - 30.05.2022 18:01

Awesome content! very verbose and thorough

Ответить
@FranciscoJunior29
@FranciscoJunior29 - 08.05.2022 02:27

Great content, it's awesome

Ответить
@godmansarah
@godmansarah - 20.04.2022 02:01

1. Could you remind me why you prefix Throwable or Exception with a backslash? I know you mentioned this in a previous video. Thanks!
2. If someone misses a space between `Throwable` and `$e`, will that cause an issue? (Noticed it in an existing file - VSCode with both PHP Code Sniffer and PHP CS Fixer doesn't seem to be complaining).

Ответить
@Soumadip_Banerjee
@Soumadip_Banerjee - 16.03.2022 09:11

Subscribed ❣️

Ответить
@christophrumpel
@christophrumpel - 04.03.2022 20:24

Nice one Gio 👍

Ответить
@yanushevitz5588
@yanushevitz5588 - 20.02.2022 16:56

Program: "throws an error"
Gio: "as you see, everything is working"
Great video, thanks for your hard work <3

Ответить
@federicobau8651
@federicobau8651 - 09.01.2022 09:58

Great video, thanks Gio

Ответить
@matthewlowe6625
@matthewlowe6625 - 03.01.2022 22:01

What IDE are you using ?

Ответить
@JonasHerbertson
@JonasHerbertson - 10.12.2021 23:15

How do you add the method in phpstorm?

Ответить
@JonasHerbertson
@JonasHerbertson - 10.12.2021 23:07

Greeeeeat tutorial! Thank you so much - exactly what I was looking for :)

Ответить
@ClawHammer23
@ClawHammer23 - 23.11.2021 01:27

c'mon people..... 2.524 visits and only 144 likes? what's wrong with you guys....hit that damn thumbs up

Ответить
@ClawHammer23
@ClawHammer23 - 23.11.2021 01:16

I can confirm, this channel is pure gold

Ответить
@gabrielpirvu670
@gabrielpirvu670 - 18.11.2021 19:53

What editor are you using?

Ответить
@timiade8108
@timiade8108 - 19.07.2021 10:24

Thanks

Ответить
@ardavanansari
@ardavanansari - 21.06.2021 13:13

Wow. Absolutely beautiful !
Thank you for all the hard work you put into this, it shows

Ответить
@vivamedia5958
@vivamedia5958 - 12.06.2021 16:26

Thank you sooooo much.... Really really helpful and awesome! looking forward for more from you.

Ответить
@artemdev110
@artemdev110 - 05.06.2021 22:56

Thanks for the video. If I have my whole application code inside try/catch block with Throable, is there any reason to use the set_error_handler and/or set_exception_handler ?

Ответить
@darom9301
@darom9301 - 04.06.2021 23:06

Honestly, this channel is pure gold 👌

Ответить
@TheArmanist
@TheArmanist - 04.06.2021 20:11

Set an exception handler:

set_exception_handler(function (\Throwable $e){
var_dump($e->getMessage());
});

echo array_rand([], 1);

but it still shows:

Warning: array_rand(): Array is empty in C:\Users\Dell\Desktop\forks\quantum-php-project\public\index.php on line 22

Ответить
@isaacsouza17
@isaacsouza17 - 04.06.2021 15:24

Awesome, helped me better understand exceptions when using Laravel, thanks bro, keep it up.

Ответить
@zubair.mohsin
@zubair.mohsin - 04.06.2021 15:01

Cool music and effects 👌

Ответить