C++でcatchの中でどこからthrowされたか見る方法はあるのかっていうこと。 コンパイラ依存とかはあんまり気にしない。 色々調べた結果、多分できなくはないっぽいが、やる意味がないと思われるという結論に達した。 可能であることの説明。 とりあえずVC++6のデバッガで見ていたのだがcatchの中ではESPの値はまだ巻き戻されていないっぽい。 サンプルソース void test() { printf("throw!"); throw std::exception("aaa"); } void main() { int a = 0; try { test(); } catch(std::exception &e) { printf("%d %p",a,&e); } } ESP とかをデバッガで追っていくとこんな感じになります。 void test() { printf("throw!");