开发者

How to 'get past' A HALT in debuggung C#, WPF

I am running an app C#, WPF and the manager is making some changes to some SP's (not mine) but it causes the app to halt. He says i should be able to

'get past this'. but when i try to continue in the Debug, it is stuck here.

here is the code: it gets halted here: "while (reader != null && reader.Read())"

Namespace OPTFDashboard.Common.Modules.AccountReceivables.DataAccess
{
    public static class BalancesRepository
    {
        public static void Summary(IEnumerable<Facility> facilities, DateTime date, Action<List<AmountDate>> completionHandler)
        {
            QueryBalances(facilities, date, true, completionHandler);
        }

        public static void Details(IEnumerable<Facility> facilities, DateTime date, Action<List<AmountDate>> completionHandler)
        {
            QueryBalances(facilities, date, false, completionHandler);
        }

        private static void QueryBalances(IEnumerable<Facility> facilities, DateTime date, Boolean isSummary, Action<List<AmountDate>> completionHandler)
        {
            DBHelper.Execute(
                DBHelper.StoredProcedure("OGEN.DBD_GET_AR_BALANCES",
                    new DBHelper.Parameter("@ASOFDATE", date),
                    new DBHelper.Parameter("@FACSTRING", DBHelper.GetFacilString(facilities)),
                    new DBHelper.Parameter("@FUNC", isSummary ? 1 : 0)),
                (reader) =>
                {
                    var balances = new List<AmountDate>();
                    while (reader != null && reader.Read())
                    {
                        balances.Add(AmountDate.CreateBalance(DBHelper.To(reader["FACILITY_KEY"], ""), DBHelper.T开发者_运维问答o(reader["FACILITY_NAME"], ""), DBHelper.To(reader["GROUP_NAME"], ""), DBHelper.ToX(reader["VALUE"], 0m), date));
                    }
                    completionHandler(balances);
                });
        }

error: "The name '$exception' does not exist in the current context"


I assume if balances are not added, the rest of the program continues? I assume this due to your manager's statement. If so, set a breakpoint at the beginning of the routine that grabs data and move past the routine when it hits the breakpoint. Manual, yes, but it will get you past this problem. If it blows up when balances are not added, then you will not just "get past it".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜