]> git.saurik.com Git - wxWidgets.git/commitdiff
don't use hardcoded constant 200; use wxSTACKWALKER_MAX_DEPTH instead
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Wed, 14 Jan 2009 14:38:00 +0000 (14:38 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Wed, 14 Jan 2009 14:38:00 +0000 (14:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/stackwalk.h
include/wx/unix/stackwalk.h
interface/wx/stackwalk.h

index a867d8f5f7ec808dd6d5e1ad0e0547e143651cae..e376ef356c06a015aca9ae6cc2ee14af51287824 100644 (file)
@@ -90,15 +90,15 @@ public:
     // only
     wxStackWalker(const char * WXUNUSED(argv0) = NULL) { }
 
-    virtual void Walk(size_t skip = 1, size_t maxDepth = 200);
+    virtual void Walk(size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
 #if wxUSE_ON_FATAL_EXCEPTION
-    virtual void WalkFromException(size_t maxDepth = 200);
+    virtual void WalkFromException(size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
 #endif // wxUSE_ON_FATAL_EXCEPTION
 
 
     // enumerate stack frames from the given context
-    void WalkFrom(const _CONTEXT *ctx, size_t skip = 1, size_t maxDepth = 200);
-    void WalkFrom(const _EXCEPTION_POINTERS *ep, size_t skip = 1, size_t maxDepth = 200);
+    void WalkFrom(const _CONTEXT *ctx, size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
+    void WalkFrom(const _EXCEPTION_POINTERS *ep, size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
 };
 
 #endif // _WX_MSW_STACKWALK_H_
index 2d1a6b53b5a1d86328316ae60584547f3c5c235b..c26883b2058772b3c6a506aebf9547c65a74e8c8 100644 (file)
@@ -73,9 +73,9 @@ public:
         FreeStack();
     }
 
-    virtual void Walk(size_t skip = 1, size_t maxDepth = 200);
+    virtual void Walk(size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
 #if wxUSE_ON_FATAL_EXCEPTION
-    virtual void WalkFromException(size_t maxDepth = 200) { Walk(2, maxDepth); }
+    virtual void WalkFromException(size_t maxDepth = wxSTACKWALKER_MAX_DEPTH) { Walk(2, maxDepth); }
 #endif // wxUSE_ON_FATAL_EXCEPTION
 
     static const wxString& GetExePath() { return ms_exepath; }
index 9d1987f7563a7733a3f541ecaf7cbd807150e00b..d0306f8443ce5e158fb03ac516ae2f7dae478f6e 100644 (file)
@@ -6,6 +6,11 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
+/**
+    This is the default value of the wxStackWalker::Walk function.
+*/
+#define wxSTACKWALKER_MAX_DEPTH   (200)
+
 /**
     @class wxStackWalker
 
@@ -62,16 +67,18 @@ public:
         notice that Walk() frame itself is not included if skip = 1).
 
         Up to @a maxDepth frames are walked from the innermost to the outermost one.
+        It defaults to ::wxSTACKWALKER_MAX_DEPTH.
     */
-    virtual void Walk(size_t skip = 1, size_t maxDepth = 200);
+    virtual void Walk(size_t skip = 1, size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
 
     /**
         Enumerate stack frames from the location of uncaught exception.
         This method can only be called from wxApp::OnFatalException().
 
         Up to @a maxDepth frames are walked from the innermost to the outermost one.
+        It defaults to ::wxSTACKWALKER_MAX_DEPTH.
     */
-    virtual void WalkFromException(size_t maxDepth = 200);
+    virtual void WalkFromException(size_t maxDepth = wxSTACKWALKER_MAX_DEPTH);
 
 protected:
     /**