null.go 399 B

12345678910111213141516
  1. package exception
  2. // NullReference is thrown when an application attempts to use null
  3. // in a case where an a non-null value is required.
  4. // NullReference implements Throwable.
  5. type NullReference struct {
  6. *Exception
  7. }
  8. // NewNullReference constructs a NullReference exception.
  9. func NewNullReference(message string, cause Throwable) *NullReference {
  10. return &NullReference{New(message, cause)}
  11. }