Class MutableExceptionContext
- java.lang.Object
-
- com.snowflake.connectors.common.exception.context.MutableExceptionContext
-
- All Implemented Interfaces:
ExceptionContext
public class MutableExceptionContext extends Object implements ExceptionContext
A mutable implementation ofExceptionContext
.
-
-
Constructor Summary
Constructors Constructor Description MutableExceptionContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
asMap()
Returns properties of this context as a map.MutableExceptionContext
put(String key, String value)
Puts a new key-value pair into the properties of this context.
-
-
-
Method Detail
-
put
public MutableExceptionContext put(String key, String value)
Puts a new key-value pair into the properties of this context.- Parameters:
key
- property keyvalue
- property value- Returns:
- this context
- Throws:
IllegalStateException
- if this context already contains a specified key
-
asMap
public Map<String,Object> asMap()
Returns properties of this context as a map.- Specified by:
asMap
in interfaceExceptionContext
- Returns:
- an immutable map containing properties of this context
-
-