- currentLevel=heirarchy.substr(0,pos);
- if (pos != (heirarchy.length()-1)) { heirarchy=heirarchy.substr(pos+1); }
- else { heirarchy = ""; }
+
+ if (pos == -1) { //you can't find another ;
+ currentLevel = heirarchy;
+ heirarchy = "";
+ m->mothurOut(seqname + " is missing a ;, please check for other errors."); m->mothurOutEndLine();
+ }else{
+ currentLevel=heirarchy.substr(0,pos);
+ if (pos != (heirarchy.length()-1)) { heirarchy=heirarchy.substr(pos+1); }
+ else { heirarchy = ""; }
+ }
+