Thread overview
Can't break App execution by ctrl+c
Apr 27, 2017
Suliman
Apr 27, 2017
Adam D. Ruppe
Apr 27, 2017
Suliman
Apr 27, 2017
Suliman
April 27, 2017
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.


April 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.
April 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:
>> 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.

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...
April 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.