digitalmars.D.learn - Can't break App execution by ctrl+c
- Suliman (18/18) Apr 27 2017 Before my code handle empty result in `catch` block. Then I moved
- Adam D. Ruppe (3/4) Apr 27 2017 You must be catching the ctrl+c exception... don't do that. Just
Before my code handle empty result in `catch` block. Then I moved it's checking to main loop, and now I can't abort App execution by ctrl+c. It's simply continue working. Here is my code: foreach(cargpspoint; cargpspoints) { auto cmd_dist = new PGCommand(pgconnection, sql_query)); try { auto nresult = cmd_dist.executeQuery(); auto nanswer = nresult.array; nresult.close(); if(nanswer.empty) { continue; } } OS: Windows.
Apr 27 2017
On Thursday, 27 April 2017 at 12:17:12 UTC, Suliman wrote:Before my code handle empty result in `catch` block.You must be catching the ctrl+c exception... don't do that. Just catch the empty result exception.
Apr 27 2017
On Thursday, 27 April 2017 at 12:25:11 UTC, Adam D. Ruppe wrote:On Thursday, 27 April 2017 at 12:17:12 UTC, Suliman wrote:The issue is gone after removing http://code.dlang.org/packages/consoled it's look like that it's produced error. Now ctrl+c is woking fine...Before my code handle empty result in `catch` block.You must be catching the ctrl+c exception... don't do that. Just catch the empty result exception.
Apr 27 2017
Just catch the empty result exception.I do not want to go to catch block if I have empty result. I just want to get there if any other error type occur. If result is empty that simply skip this step.
Apr 27 2017