Public Member Functions | Static Public Member Functions
morphio::readers::ErrorMessages Class Reference

#include <errorMessages.h>

Public Member Functions

 ErrorMessages (const std::string &uri)
 
std::string errorLink (long unsigned int lineNumber, ErrorLevel errorLevel) const
 
std::string errorMsg (long unsigned int lineNumber, ErrorLevel errorLevel, std::string msg="") const
 
std::string ERROR_OPENING_FILE () const
 
std::string ERROR_LINE_NON_PARSABLE (long unsigned int lineNumber) const
 
std::string ERROR_UNSUPPORTED_SECTION_TYPE (long unsigned int lineNumber, const SectionType &type) const
 
std::string ERROR_UNSUPPORTED_VASCULATURE_SECTION_TYPE (long unsigned int lineNumber, const VascularSectionType &type) const
 
std::string ERROR_MULTIPLE_SOMATA (const std::vector< Sample > &somata) const
 
std::string ERROR_MISSING_PARENT (const Sample &sample) const
 
std::string ERROR_SOMA_BIFURCATION (const Sample &sample, const std::vector< Sample > &children) const
 
std::string ERROR_SOMA_WITH_NEURITE_PARENT (const Sample &sample) const
 
std::string ERROR_REPEATED_ID (const Sample &originalSample, const Sample &newSample) const
 
std::string ERROR_SELF_PARENT (const Sample &sample) const
 
std::string ERROR_NOT_IMPLEMENTED_UNDEFINED_SOMA (const std::string &) const
 
std::string ERROR_MISSING_MITO_PARENT (int mitoParentId) const
 
std::string ERROR_SOMA_ALREADY_DEFINED (long unsigned int lineNumber) const
 
std::string ERROR_PARSING_POINT (long unsigned int lineNumber, const std::string &point) const
 
std::string ERROR_UNKNOWN_TOKEN (long unsigned int lineNumber, const std::string &token) const
 
std::string ERROR_UNEXPECTED_TOKEN (long unsigned int lineNumber, const std::string &expected, const std::string &got, const std::string &msg) const
 
std::string ERROR_EOF_REACHED (long unsigned int lineNumber) const
 
std::string ERROR_EOF_IN_NEURITE (long unsigned int lineNumber) const
 
std::string ERROR_EOF_UNBALANCED_PARENS (long unsigned int lineNumber) const
 
std::string ERROR_UNCOMPATIBLE_FLAGS (morphio::Option flag1, morphio::Option flag2) const
 
std::string ERROR_UNSUPPORTED_SECTION_TYPE (const SectionType &type) const
 
std::string ERROR_WRONG_EXTENSION (const std::string &filename) const
 
std::string ERROR_VECTOR_LENGTH_MISMATCH (const std::string &vec1, size_t length1, const std::string &vec2, size_t length2) const
 
std::string ERROR_PERIMETER_DATA_NOT_WRITABLE ()
 
std::string ERROR_ONLY_CHILD_SWC_WRITER (unsigned int parentId) const
 
std::string WARNING_MITOCHONDRIA_WRITE_NOT_SUPPORTED () const
 
std::string WARNING_WRITE_NO_SOMA () const
 
std::string WARNING_WRITE_EMPTY_MORPHOLOGY () const
 
std::string WARNING_NO_SOMA_FOUND () const
 
std::string WARNING_ZERO_DIAMETER (const Sample &sample) const
 
std::string WARNING_DISCONNECTED_NEURITE (const Sample &sample) const
 
std::string WARNING_WRONG_DUPLICATE (const std::shared_ptr< morphio::mut::Section > &current, const std::shared_ptr< morphio::mut::Section > &parent) const
 
std::string WARNING_APPENDING_EMPTY_SECTION (std::shared_ptr< morphio::mut::Section >)
 
std::string WARNING_ONLY_CHILD (const DebugInfo &info, unsigned int parentId, unsigned int childId) const
 
std::string WARNING_NEUROMORPHO_SOMA_NON_CONFORM (const Sample &root, const Sample &child1, const Sample &child2)
 
std::string WARNING_WRONG_ROOT_POINT (const std::vector< Sample > &children) const
 

Static Public Member Functions

static bool isIgnored (Warning warning)
 

Detailed Description

Class that can generate error messages and holds a collection of predefined errors messages

Constructor & Destructor Documentation

◆ ErrorMessages()

morphio::readers::ErrorMessages::ErrorMessages ( const std::string &  uri)
inlineexplicit

Constructor.

Parameters
uripath to a morphology file.

Member Function Documentation

◆ ERROR_EOF_IN_NEURITE()

std::string morphio::readers::ErrorMessages::ERROR_EOF_IN_NEURITE ( long unsigned int  lineNumber) const

ASC EOF reached in neurite error message

◆ ERROR_EOF_REACHED()

std::string morphio::readers::ErrorMessages::ERROR_EOF_REACHED ( long unsigned int  lineNumber) const

ASC EOF reached error message

◆ ERROR_EOF_UNBALANCED_PARENS()

std::string morphio::readers::ErrorMessages::ERROR_EOF_UNBALANCED_PARENS ( long unsigned int  lineNumber) const

ASC unbalanced parents error message

◆ ERROR_LINE_NON_PARSABLE()

std::string morphio::readers::ErrorMessages::ERROR_LINE_NON_PARSABLE ( long unsigned int  lineNumber) const

Non parsable line error message

◆ ERROR_MISSING_MITO_PARENT()

std::string morphio::readers::ErrorMessages::ERROR_MISSING_MITO_PARENT ( int  mitoParentId) const

Missing mitochondria parent section error message

◆ ERROR_MISSING_PARENT()

std::string morphio::readers::ErrorMessages::ERROR_MISSING_PARENT ( const Sample sample) const

Missing section parent error message

◆ ERROR_MULTIPLE_SOMATA()

std::string morphio::readers::ErrorMessages::ERROR_MULTIPLE_SOMATA ( const std::vector< Sample > &  somata) const

Multiple somas error message

◆ ERROR_NOT_IMPLEMENTED_UNDEFINED_SOMA()

std::string morphio::readers::ErrorMessages::ERROR_NOT_IMPLEMENTED_UNDEFINED_SOMA ( const std::string &  ) const

Undefined soma error message

◆ ERROR_ONLY_CHILD_SWC_WRITER()

std::string morphio::readers::ErrorMessages::ERROR_ONLY_CHILD_SWC_WRITER ( unsigned int  parentId) const

Single section child SWC error message

◆ ERROR_OPENING_FILE()

std::string morphio::readers::ErrorMessages::ERROR_OPENING_FILE ( ) const

Opening file error message

◆ ERROR_PARSING_POINT()

std::string morphio::readers::ErrorMessages::ERROR_PARSING_POINT ( long unsigned int  lineNumber,
const std::string &  point 
) const

Parsing ASC points error message

◆ ERROR_PERIMETER_DATA_NOT_WRITABLE()

std::string morphio::readers::ErrorMessages::ERROR_PERIMETER_DATA_NOT_WRITABLE ( )

Cant write perimeter data to SWC,ASC error message

◆ ERROR_REPEATED_ID()

std::string morphio::readers::ErrorMessages::ERROR_REPEATED_ID ( const Sample originalSample,
const Sample newSample 
) const

Repeated section id error message

◆ ERROR_SELF_PARENT()

std::string morphio::readers::ErrorMessages::ERROR_SELF_PARENT ( const Sample sample) const

Section self parent error message

◆ ERROR_SOMA_ALREADY_DEFINED()

std::string morphio::readers::ErrorMessages::ERROR_SOMA_ALREADY_DEFINED ( long unsigned int  lineNumber) const

Already defined soma error message

◆ ERROR_SOMA_BIFURCATION()

std::string morphio::readers::ErrorMessages::ERROR_SOMA_BIFURCATION ( const Sample sample,
const std::vector< Sample > &  children 
) const

Bifurcating soma error message

◆ ERROR_SOMA_WITH_NEURITE_PARENT()

std::string morphio::readers::ErrorMessages::ERROR_SOMA_WITH_NEURITE_PARENT ( const Sample sample) const

Soma with neurite parent error message

◆ ERROR_UNCOMPATIBLE_FLAGS()

std::string morphio::readers::ErrorMessages::ERROR_UNCOMPATIBLE_FLAGS ( morphio::Option  flag1,
morphio::Option  flag2 
) const

Incompatible flags error message

◆ ERROR_UNEXPECTED_TOKEN()

std::string morphio::readers::ErrorMessages::ERROR_UNEXPECTED_TOKEN ( long unsigned int  lineNumber,
const std::string &  expected,
const std::string &  got,
const std::string &  msg 
) const

Unexpected ASC token error message

◆ ERROR_UNKNOWN_TOKEN()

std::string morphio::readers::ErrorMessages::ERROR_UNKNOWN_TOKEN ( long unsigned int  lineNumber,
const std::string &  token 
) const

Unknown ASC token error message

◆ ERROR_UNSUPPORTED_SECTION_TYPE() [1/2]

std::string morphio::readers::ErrorMessages::ERROR_UNSUPPORTED_SECTION_TYPE ( const SectionType type) const

Unsupported morphology section type error message

◆ ERROR_UNSUPPORTED_SECTION_TYPE() [2/2]

std::string morphio::readers::ErrorMessages::ERROR_UNSUPPORTED_SECTION_TYPE ( long unsigned int  lineNumber,
const SectionType type 
) const

Unsupported morphology section type error message

◆ ERROR_UNSUPPORTED_VASCULATURE_SECTION_TYPE()

std::string morphio::readers::ErrorMessages::ERROR_UNSUPPORTED_VASCULATURE_SECTION_TYPE ( long unsigned int  lineNumber,
const VascularSectionType type 
) const

Unsupported vasculature section type error message

◆ ERROR_VECTOR_LENGTH_MISMATCH()

std::string morphio::readers::ErrorMessages::ERROR_VECTOR_LENGTH_MISMATCH ( const std::string &  vec1,
size_t  length1,
const std::string &  vec2,
size_t  length2 
) const

Vector length mismatch error message

◆ ERROR_WRONG_EXTENSION()

std::string morphio::readers::ErrorMessages::ERROR_WRONG_EXTENSION ( const std::string &  filename) const

Wrong morphology file extension error message

◆ errorLink()

std::string morphio::readers::ErrorMessages::errorLink ( long unsigned int  lineNumber,
ErrorLevel  errorLevel 
) const
inline

Returns a link to a line number within the morphology file

◆ errorMsg()

std::string morphio::readers::ErrorMessages::errorMsg ( long unsigned int  lineNumber,
ErrorLevel  errorLevel,
std::string  msg = "" 
) const

Generate an error message.

◆ isIgnored()

static bool morphio::readers::ErrorMessages::isIgnored ( Warning  warning)
static

Is the output of the warning ignored

◆ WARNING_APPENDING_EMPTY_SECTION()

std::string morphio::readers::ErrorMessages::WARNING_APPENDING_EMPTY_SECTION ( std::shared_ptr< morphio::mut::Section )

Writing empty section warning message

◆ WARNING_DISCONNECTED_NEURITE()

std::string morphio::readers::ErrorMessages::WARNING_DISCONNECTED_NEURITE ( const Sample sample) const

Writing disconnected neurite warning message

◆ WARNING_MITOCHONDRIA_WRITE_NOT_SUPPORTED()

std::string morphio::readers::ErrorMessages::WARNING_MITOCHONDRIA_WRITE_NOT_SUPPORTED ( ) const

Writing of mitochondria is not supported warning message

◆ WARNING_NEUROMORPHO_SOMA_NON_CONFORM()

std::string morphio::readers::ErrorMessages::WARNING_NEUROMORPHO_SOMA_NON_CONFORM ( const Sample root,
const Sample child1,
const Sample child2 
)

Soma does not conform NeuroMorpho warning message

◆ WARNING_NO_SOMA_FOUND()

std::string morphio::readers::ErrorMessages::WARNING_NO_SOMA_FOUND ( ) const

Soma not found warning message

◆ WARNING_ONLY_CHILD()

std::string morphio::readers::ErrorMessages::WARNING_ONLY_CHILD ( const DebugInfo info,
unsigned int  parentId,
unsigned int  childId 
) const

Writing single child section warning message

◆ WARNING_WRITE_EMPTY_MORPHOLOGY()

std::string morphio::readers::ErrorMessages::WARNING_WRITE_EMPTY_MORPHOLOGY ( ) const

Writing empty morphology warning message

◆ WARNING_WRITE_NO_SOMA()

std::string morphio::readers::ErrorMessages::WARNING_WRITE_NO_SOMA ( ) const

Writing without soma warning message

◆ WARNING_WRONG_DUPLICATE()

std::string morphio::readers::ErrorMessages::WARNING_WRONG_DUPLICATE ( const std::shared_ptr< morphio::mut::Section > &  current,
const std::shared_ptr< morphio::mut::Section > &  parent 
) const

Writing wrong duplicate warning message

◆ WARNING_WRONG_ROOT_POINT()

std::string morphio::readers::ErrorMessages::WARNING_WRONG_ROOT_POINT ( const std::vector< Sample > &  children) const

Wrong root point warning message

◆ WARNING_ZERO_DIAMETER()

std::string morphio::readers::ErrorMessages::WARNING_ZERO_DIAMETER ( const Sample sample) const

Writing zero diameter warning message