Open
Description
Scott began a section on exceptions, which I have updated.
Scott also added some notes on errors in the GraphBLAS C API, which I have moved to below:
Notes on C API errors
Informational return values
SUCCESS
: not necessary with exceptionsNO_VALUE
: happens in extractElement() method when providing a transparent destination scalar and no stored value. Usinggrb::out_of_range
exception. The justification for changing informational return with exception is the consistency with STL containerat()
method behaviour.
API errors
UNINITIALIZED_OBJECT
: not necessary with RAII philosophyNULL_POINTER
: not necessary, no pointers used in C++ APIINVALID_VALUE
:- used with incorrect enum values (not necessary in C++)
- used if a dimension is defined as 0 (like in vector or matrix construction or resize, (do we need this?)
- duplicate indices during build (do we need this?).
INVALID_INDEX
: This is specifically for indices that are outside the defined dimensions (forsetElement()
,extractElement()
,removeElement()
). Does this overload withNO_VALUE
?DOMAIN_MISMATCH
: not applicable in C++...if it compiles there is no mismatch.OUTPUT_NOT_EMPTY
: was used when trying tobuild
with a container that is not empty....what should C++ do?NOT_IMPLEMENTED
: ???
Execution Errors
PANIC
- do we need this?OUT_OF_MEMORY
: usingstd::bad_alloc
... why notgrb::bad_alloc
? Because allocators not part of GraphBLAS spec.INSUFFICIENT_SPACE
: ???INVALID_OBJECT
: The requires a discussion of exception quarantees. I.e. what is the state of an output object when an exception is thrown during an operation it was called with? This is also complicated by non-blocking mode which is deferred for now.INDEX_OUT_OF_BOUNDS
:grb::out_of_range
(This is overloaded use...for two different meanings)EMPTY_OBJECT
: (only called in reduce to scalar...does C++ API side step this)
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In Progress