| 12566 | |
| 12567 | #ifdef CONFIG_DEBUGGER |
| 12568 | LPCTSTR Debugger::WhatThrew() |
| 12569 | { |
| 12570 | // We want 'What' to indicate the function/sub/operation that *threw* the exception. |
| 12571 | // For BIFs, throwing is always explicit. For a UDF, 'What' should only name it if |
| 12572 | // it explicitly constructed the Exception object. This provides an easy way for |
| 12573 | // OnError and Catch to categorise errors. No information is lost because File/Line |
| 12574 | // can already be used locate the function/sub that was running. |
| 12575 | // So only return a name when a BIF is raising an error: |
| 12576 | if (mStack.mTop < mStack.mBottom || mStack.mTop->type != DbgStack::SE_BIF) |
| 12577 | return _T(""); |
| 12578 | return mStack.mTop->func->mName; |
| 12579 | } |
| 12580 | #endif |
| 12581 | |
| 12582 |
no outgoing calls
no test coverage detected