Тёмный

Dart Exception Handling | How to handle Exceptions in Dart. Dart Tutorial for Flutter #7.1 

Smartherd
Подписаться 136 тыс.
Просмотров 63 тыс.
50% 1

Опубликовано:

 

18 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@davestr2046
@davestr2046 6 лет назад
Love these tutorials. Short and straight to the point with concise, clear examples. Well done. I have learned a lot. Terrific. Thank you.
@raymkfc
@raymkfc 2 месяца назад
I've learnt a lot so far from this Dart series! Really really thanks a lot! Very clear and solid teaching!
@vighneshsharma
@vighneshsharma 2 года назад
For all the peeps who are facing error in dartpad The issue here is that dart2js, which DartPad is based on, does not throw an IntegerDivisionByZeroException (which should really be named DivisionByZeroError, but alas, isn't) when you do integer division by zero. It throws, but it's using UnsupportedError instead, which is otherwise a good choice for such an error. Dart2js is not wrong. Neither the language specification, nor the library documentation for num.~/ says that it should throw that particular error type. Still, it's inconsistent with the other compilers, so we may want to make it consisent. or simply try replacing the error recieved with IntegerDivisionByZeroException with the error found i.e void main(){ try { int result = 12 ~/ 0; print (result); } on UnsupportedError { print("hogaya solve"); }finally{ print("cool"); } }
@karthickrajalearn
@karthickrajalearn 5 лет назад
In 3m 52sec Great Tip Whenever we know that Exception Name that time we have to use "on" keyword In 5m 16sec Thanks for Mentioning Comments as Notes
@ErangadeSaramEra
@ErangadeSaramEra 5 лет назад
Hats off, your a born teacher (lecturer), Thanks for these lessons
@andrewmukelabai8209
@andrewmukelabai8209 5 лет назад
Hats off man! Absolutely well presented! The content just flows. Your ability to compress key concepts so well and clearly is just amazing! Thanks for this work.
@PrimaClicks
@PrimaClicks 4 года назад
Perfect ehhehe, well-done dear, your huge efforts make this easy.
@leonvanrijswijk8409
@leonvanrijswijk8409 4 года назад
I really like your way of explaining: structured, complete, clear and usable. Hope you will be making more Flutter vids in the future. Thanks.
@saisasisai
@saisasisai 4 года назад
Nice 👌 Tutorial series ...!
@yashchandratray774
@yashchandratray774 3 года назад
Wow great, The way he will explain everyone can easily know how to fix all problems by exception
@opmovieclips8036
@opmovieclips8036 6 лет назад
perfect 😃 😂 😂
@webemerson101
@webemerson101 4 года назад
as usual very informative! you deserve my like and subscribe more power!
@sabinjose
@sabinjose 5 лет назад
Good Video.. Well presented!
@abraramirhussain6778
@abraramirhussain6778 4 года назад
you're tutorials are awesome. keep it up
@foodiepoode
@foodiepoode 3 года назад
Wow amazing
@Meeshalkumar
@Meeshalkumar 4 года назад
What if I'll return while in catch ( when using functions), will the finally still run?
@yuvrajrana678
@yuvrajrana678 Год назад
keep it up bro.
@Techie7781
@Techie7781 5 лет назад
Well explained... ♥️♥️👏👏👏
@dipendrasaini
@dipendrasaini 5 лет назад
void main() { try { int x =12 ~/ 0; print("the result is $x"); } on IntegerDivisionByZeroException { print("cannot devide by zero"); } } // gives me this type of error Uncaught exception: Unsupported operation: Result of truncating division is Infinity: 12 ~/ 0 its mean exception is not handled by the on clause?
@programan6391
@programan6391 5 лет назад
I've got the same here dartpad. dartlang. org, but works fine on my pc, maybe some issue on dartpad . org.
@lyricsstudio6210
@lyricsstudio6210 4 года назад
I got same problem on dartpad. I guess there is a problem on website
@heyjainam
@heyjainam 3 года назад
same issue.
@abhaythakur8572
@abhaythakur8572 5 лет назад
great video man
@ranjitjohnbgl
@ranjitjohnbgl 4 года назад
Its really a great effort....! Thanks a lot! Meanwhile when i tried following code, //exception handling using by clause void main(){ try { int i= 12 ~/ 0; print (i); } on IntegerDivisionByZeroException { print ("number can not be divided by zero"); } } It throws this error "Error: Unsupported operation: Result of truncating division is Infinity: 12 ~/ 0". Can you please explain?
@pratik1853
@pratik1853 2 года назад
replace integerdivisionbyzeroexception by UnsupportedError
@krishnakumarramachandran5888
@krishnakumarramachandran5888 5 лет назад
Good Explanation Sir👌
@smartherd
@smartherd 5 лет назад
Thanks
@apnatuitioncoding
@apnatuitioncoding 2 года назад
what is live example of stack strace..
@Funtainer007
@Funtainer007 3 года назад
Perfect
@armagan_gok
@armagan_gok 3 года назад
dude, you should consider updating videos, there are some new stuffs in dart
@annenicole4112
@annenicole4112 4 года назад
Thank you so much for your videos, you're a natural born teacher! About handling Exceptions, when I test code in DartPad, I just get this message in the console "Script error". I'd like to test in Android studio to get full error messages, but I don't know how to run code directly in the console, without an emulator. Anyone could help me? Cheers
@attimeequalszero6750
@attimeequalszero6750 4 года назад
Hi, Hope you have found the solution, if not consider trying this stackoverflow.com/questions/53888000/how-to-run-dart-in-android-studio/53888108 For practicing dart you can consider using Visual Studio Code instead of Android studio.
@SeraphimTech_io
@SeraphimTech_io 6 лет назад
hi how many videos are there for dart tutorial? and when you are going to start flutter tutorial? thanks a lot
@smartherd
@smartherd 6 лет назад
15 more
@amianand
@amianand 3 года назад
sir, your code file link does not work. please help sir
@Nicosfrs
@Nicosfrs 2 года назад
IntegerDivisionByZeroException is now deprecated, what should I use instead?
@udochukwuabazie5895
@udochukwuabazie5895 Год назад
UnsupportedError
@saptorshedas8686
@saptorshedas8686 5 лет назад
How to take user input in dart?
@pratik1853
@pratik1853 2 года назад
replace integerdivisionbyzeroexception by UnsupportedError for all of you who is getting error on dartpad
@rogiergorter6214
@rogiergorter6214 3 года назад
I find it anyway difficult to implement these error exceptions in code.
@shivatiwari1127
@shivatiwari1127 4 года назад
👍
@kamalams6800
@kamalams6800 3 года назад
Your code is not working in dartpad, Atom and vs code also. Kindly try helping us Smartherd people. Please
@pratik1853
@pratik1853 2 года назад
its working just replace integerdivisionbyzeroexception by UnsupportedError
@enesaslan3275
@enesaslan3275 5 лет назад
pls sub title. Thanks
@sunilchowdary5038
@sunilchowdary5038 3 года назад
Your code is not working in dartpad and vs code also !!!
@cscs6587
@cscs6587 2 года назад
This course is so outdated.
@opmovieclips8036
@opmovieclips8036 6 лет назад
perfect 😃 😂 😂
Далее
Advanced Exception Handling in Python
12:06
Просмотров 62 тыс.