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_ONLY_CHILD_SWC_WRITER (unsigned int parentId) const
std::string WARNING_WRITE_NO_SOMA () 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)


uripath to a morphology file.

Member Function Documentation


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

ASC EOF reached in neurite error message


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

ASC EOF reached error message


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

ASC unbalanced parents error message


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

Non parsable line error message


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

Missing mitochondria parent section error message


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

Missing section parent error message


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

Multiple somas error message


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

Undefined soma error message


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

Single section child SWC error message


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

Opening file error message


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

Parsing ASC points error message


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

Cant write perimeter data to SWC,ASC error message


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

Repeated section id error message


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

Section self parent error message


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

Already defined soma error message


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

Bifurcating soma error message


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

Soma with neurite parent error message


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

Incompatible flags error message


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


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

Unknown ASC token error message


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

Unsupported morphology section type error message


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

Unsupported morphology section type error message


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

Unsupported vasculature section type error message


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


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

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)

Is the output of the warning ignored


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

Writing empty section warning message


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

Writing disconnected neurite warning message


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

Writing of mitochondria is not supported warning message


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


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

Soma not found warning message


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

Writing single child section warning message


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

Writing empty morphology warning message


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

Writing without soma warning message


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


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

Wrong root point warning message


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

Writing zero diameter warning message