From 872e44b444af1da08d04afc4629a70011ed2ea54 Mon Sep 17 00:00:00 2001
From: "SND\\kernelnet_cp"
 <SND\kernelnet_cp@9b283d60-5439-405e-af05-b73fd8c4d996>
Date: Mon, 6 May 2013 06:06:51 +0000
Subject: [PATCH] [0.2.x] fixed : issue #11672 ( iteration through local vars
 raises unexpected exception )

git-svn-id: https://pykd.svn.codeplex.com/svn@83600 9b283d60-5439-405e-af05-b73fd8c4d996
---
 pykd/pykdver.h    | 2 +-
 pykd/stkframe.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pykd/pykdver.h b/pykd/pykdver.h
index 7aa9c53..f09e6a5 100644
--- a/pykd/pykdver.h
+++ b/pykd/pykdver.h
@@ -2,7 +2,7 @@
 #define PYKD_VERSION_MAJOR      0
 #define PYKD_VERSION_MINOR      2
 #define PYKD_VERSION_SUBVERSION 0
-#define PYKD_VERSION_BUILDNO    19
+#define PYKD_VERSION_BUILDNO    20
 
 
 #define __VER_STR2__(x) #x
diff --git a/pykd/stkframe.cpp b/pykd/stkframe.cpp
index fe2d870..f66d594 100644
--- a/pykd/stkframe.cpp
+++ b/pykd/stkframe.cpp
@@ -408,7 +408,7 @@ python::object  StackFrame::getLocalByIndex( ULONG index )
     }
 
     if ( !symVar )
-        throw DbgException("local var not found");
+        throw PyException( PyExc_IndexError, "index out of range" );
 
     ULONG64 varAddr;
     const LocationType locType = static_cast<LocationType>(symVar->getLocType());
@@ -476,7 +476,7 @@ python::object StackFrame::getParamByIndex( ULONG index )
     }
 
     if ( !symVar )
-        throw DbgException("local var not found");
+        throw PyException( PyExc_IndexError, "index out of range" );
 
     ULONG64 varAddr;
     const LocationType locType = static_cast<LocationType>(symVar->getLocType());