Most voted "throw" questions
It should be used whenever the "throw" command is used preponderantly in the problem. This command throws an exception. In some languages has another name, such as "raise"
Learn more…5 questions
Sort by count of
-
18
votes1
answer2737
viewsWhat’s the difference between "throw" and "throw ex"?
I saw that the C# allows to do... try { //algum código } catch { throw; } also... try { //algum código } catch (Exception ex) { throw ex; } and... try { //algum código } catch (Exception) { throw; }…
-
2
votes1
answer42
viewsIs it possible to declare that in a function you launch an exception with PHP?
With a small example: public function calcularMedia($valor){ if($valor < 0){ //LANÇAR EXCEÇÃO } else if($valor > 6){ return "Passou"; }else{ return "Recuperação"; } } Remembering this function…
-
1
votes1
answer86
viewsInstruction throw is making the system inconsistent
I have a Try.. catch and catch the fellow who did let only throw. catch(){throw;} Well, my intention is to treat all that exceptions and not just let throw. But since I just got here at the company,…
-
1
votes1
answer152
viewsReturn method with throw
This method has the type of return Connection, however in the blocks catch there is no return conn and still there is no compilation or execution error. I believe it is by throws and throw but I…
-
-1
votes1
answer64
viewsTrying to create my own Java checked exception
Guys, my question is this:: In the file method, I really need to do this Try-catch? In my mind I wouldn’t need to since I’m declaring the throws with my class…