StackOverflowExceptionとは? わかりやすく解説

StackOverflowException クラス

入れ子になったメソッド呼び出し多くなりすぎ、実行スタックオーバーフローした場合スローされる例外。このクラス継承できません。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class
 StackOverflowException
    Inherits SystemException
Dim instance As StackOverflowException
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public sealed class StackOverflowException
 : SystemException
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
public ref class StackOverflowException sealed
 : public SystemException
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class StackOverflowException extends
 SystemException
SerializableAttribute 
ComVisibleAttribute(true) 
public final class StackOverflowException extends
 SystemException
解説解説

StackOverflowException は、再帰回数がかなり多い場合無限に続く場合などに生じる、実行スタックオーバーフローによるエラーに対してスローさます。MSIL (Microsoft Intermediate Language) の Localloc 命令は、StackOverflowExceptionスローます。

StackOverflowException は、値 0x800703E9 を保持する HRESULT COR_E_STACKOVERFLOW を使用しますStackOverflowException オブジェクト初期プロパティ値の一覧については、StackOverflowException コンストラクタトピック参照してください

メモメモ

継承されData プロパティの値は常に null 参照 (Visual Basic では Nothing) です。

バージョンの考慮事項

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition プラットフォームメモ : スローされた StackOverflowException を try-catch ブロックキャッチすることはできません。したがって例外によってプロセス即座に終了させられます。

継承階層継承階層
System.Object
   System.Exception
     System.SystemException
      System.StackOverflowException
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

StackOverflowException コンストラクタ ()

StackOverflowException クラス新しインスタンスMessage プロパティに、"要求され操作によってスタック オーバーフロー発生しました。" などのエラー説明するシステムから提供されるメッセージ設定して、その新しインスタンス初期化します。このメッセージは、システム現在のカルチャを考慮して指定します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Dim instance As New StackOverflowException
public StackOverflowException ()
public:
StackOverflowException ()
public StackOverflowException ()
public function StackOverflowException ()
解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
StackOverflowException クラス
StackOverflowException メンバ
System 名前空間

StackOverflowException コンストラクタ (String)

指定したエラー メッセージ使用して、StackOverflowException クラス新しインスタンス初期化します。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Dim message As String

Dim instance As New StackOverflowException(message)
public StackOverflowException (
    string message
)
public:
StackOverflowException (
    String^ message
)
public StackOverflowException (
    String message
)
public function StackOverflowException (
    message : String
)

パラメータ

message

エラー説明する Stringメッセージ内容は、ユーザー理解できる内容にします。このコンストラクタ呼び出し元は、この文字列現在のシステムのカルチャに合わせてローカライズ済みであることを確認しておく必要があります

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
StackOverflowException クラス
StackOverflowException メンバ
System 名前空間

StackOverflowException コンストラクタ (String, Exception)

指定したエラー メッセージと、この例外原因である内部例外への参照使用して、StackOverflowException クラス新しインスタンス初期化します。

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Sub New ( _
    message As String, _
    innerException As Exception _
)
Dim message As String
Dim innerException As Exception

Dim instance As New StackOverflowException(message,
 innerException)
public StackOverflowException (
    string message,
    Exception innerException
)
public:
StackOverflowException (
    String^ message, 
    Exception^ innerException
)
public StackOverflowException (
    String message, 
    Exception innerException
)
public function StackOverflowException (
    message : String, 
    innerException : Exception
)

パラメータ

message

例外原因説明するエラー メッセージ

innerException

現在の例外の原因である例外innerException パラメータnull 参照 (Visual Basic の場合Nothing) でない場合は、内部例外処理する catch ブロック現在の例外が発生します

解説解説

前の例外直接結果としてスローされる例外については、InnerException プロパティに、前の例外への参照格納されます。InnerException プロパティは、コンストラクタ渡されたものと同じ値を返しますInnerException プロパティによって内部例外値がコンストラクタ渡されなかった場合は、null 参照 (Visual Basic の場合Nothing) を返します

StackOverflowExceptionインスタンス初期プロパティ値を次の表に示します

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

StackOverflowException コンストラクタ


StackOverflowException プロパティ


StackOverflowException メソッド


StackOverflowException メンバ

入れ子になったメソッド呼び出し多くなりすぎ、実行スタックオーバーフローした場合スローされる例外。このクラス継承できません。

StackOverflowException データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド StackOverflowException オーバーロードされます。 StackOverflowException クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
参照参照

関連項目

StackOverflowException クラス
System 名前空間
Exception クラス

その他の技術情報

例外の処理とスロー



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「StackOverflowException」の関連用語

StackOverflowExceptionのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



StackOverflowExceptionのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS