github.com/searKing/golang/go@v1.2.74/error/exception/runtime_exception.go (about)

     1  // Copyright 2020 The searKing Author. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package exception
     6  
     7  type RuntimeException struct {
     8  	*Exception
     9  }
    10  
    11  func NewRuntimeException() *RuntimeException {
    12  	return &RuntimeException{
    13  		Exception: NewException(),
    14  	}
    15  }
    16  
    17  func NewRuntimeException1(message string) *RuntimeException {
    18  	return &RuntimeException{
    19  		Exception: NewException1(message),
    20  	}
    21  }
    22  
    23  func NewRuntimeException2(message string, cause Throwable) *RuntimeException {
    24  	return &RuntimeException{
    25  		Exception: NewException2(message, cause),
    26  	}
    27  }
    28  
    29  func NewRuntimeException4(message string, cause Throwable, enableSuppression, writableStackTrace bool) *RuntimeException {
    30  	return &RuntimeException{
    31  		Exception: NewException4(message, cause, enableSuppression, writableStackTrace),
    32  	}
    33  }