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

  Рет қаралды 64,373

Smartherd

Smartherd

Күн бұрын

Пікірлер
@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.
@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
@raymkfc
@raymkfc 6 ай бұрын
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"); } }
@Mariam_Arrashid
@Mariam_Arrashid Ай бұрын
thanks
@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.
@ErangadeSaramEra
@ErangadeSaramEra 5 жыл бұрын
Hats off, your a born teacher (lecturer), Thanks for these lessons
@leonvanrijswijk8409
@leonvanrijswijk8409 5 жыл бұрын
I really like your way of explaining: structured, complete, clear and usable. Hope you will be making more Flutter vids in the future. Thanks.
@yashchandratray774
@yashchandratray774 4 жыл бұрын
Wow great, The way he will explain everyone can easily know how to fix all problems by exception
@PrimaClicks
@PrimaClicks 4 жыл бұрын
Perfect ehhehe, well-done dear, your huge efforts make this easy.
@webemerson101
@webemerson101 5 жыл бұрын
as usual very informative! you deserve my like and subscribe more power!
@abraramirhussain6778
@abraramirhussain6778 4 жыл бұрын
you're tutorials are awesome. keep it up
@saisasisai
@saisasisai 4 жыл бұрын
Nice 👌 Tutorial series ...!
@sabinjose
@sabinjose 6 жыл бұрын
Good Video.. Well presented!
@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
@Meeshalkumar
@Meeshalkumar 5 жыл бұрын
What if I'll return while in catch ( when using functions), will the finally still run?
@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 4 жыл бұрын
same issue.
@abhaythakur8572
@abhaythakur8572 5 жыл бұрын
great video man
@yuvrajrana678
@yuvrajrana678 2 жыл бұрын
keep it up bro.
@Techie7781
@Techie7781 5 жыл бұрын
Well explained... ♥️♥️👏👏👏
@apnatuitioncoding
@apnatuitioncoding 3 жыл бұрын
what is live example of stack strace..
@krishnakumarramachandran5888
@krishnakumarramachandran5888 6 жыл бұрын
Good Explanation Sir👌
@smartherd
@smartherd 6 жыл бұрын
Thanks
@foodiepoode
@foodiepoode 3 жыл бұрын
Wow amazing
@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
@pratik1853
@pratik1853 2 жыл бұрын
replace integerdivisionbyzeroexception by UnsupportedError for all of you who is getting error on dartpad
@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?
@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
@Funtainer007
@Funtainer007 4 жыл бұрын
Perfect
@rogiergorter6214
@rogiergorter6214 4 жыл бұрын
I find it anyway difficult to implement these error exceptions in code.
@sunilchowdary5038
@sunilchowdary5038 3 жыл бұрын
Your code is not working in dartpad and vs code also !!!
@shivatiwari1127
@shivatiwari1127 5 жыл бұрын
👍
@enesaslan3275
@enesaslan3275 5 жыл бұрын
pls sub title. Thanks
@RbyLearning
@RbyLearning 2 жыл бұрын
This course is so outdated.
She wanted to set me up #shorts by Tsuriki Show
0:56
Tsuriki Show
Рет қаралды 8 МЛН
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
GraphRAG vs In-Context Learning ICL
33:29
Discover AI
Рет қаралды 1,5 М.
Exception handling in C++ (How to handle errors in your program?)
24:46
Top 12 Flutter Tips & Tricks
9:32
Fireship
Рет қаралды 272 М.
Checked vs. Unchecked Exceptions in Java Tutorial - What's The Difference?
10:14
Advanced Exception Handling in Python
12:06
NeuralNine
Рет қаралды 69 М.
She wanted to set me up #shorts by Tsuriki Show
0:56
Tsuriki Show
Рет қаралды 8 МЛН