Skip to content

Commit

Permalink
fix #365, improve error messages for ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaller committed Sep 14, 2023
1 parent d71d392 commit cbc87e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/species.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5120,7 +5120,7 @@ void Species::DerivedStatesFromAscii(tsk_table_collection_t *p_tables)
binary_derived_state_offset.emplace_back((tsk_size_t)(derived_state_total_part_count * sizeof(slim_mutationid_t)));
}
} catch (...) {
EIDOS_TERMINATION << "ERROR (Species::DerivedStatesFromAscii): a mutation derived state was not convertible into an int64_t mutation id. The tree-sequence data may not be annotated for SLiM, or may be corrupted." << EidosTerminate();
EIDOS_TERMINATION << "ERROR (Species::DerivedStatesFromAscii): a mutation derived state was not convertible into an int64_t mutation id. The tree-sequence data may not be annotated for SLiM, or may be corrupted. If mutations were added in msprime, do you want to use the msprime.SLiMMutationModel?" << EidosTerminate();
}

if (binary_derived_state.size() == 0)
Expand Down Expand Up @@ -7506,7 +7506,7 @@ void Species::__PrepareSubpopulationsFromTables(std::unordered_map<slim_objectid
if (p_subpopInfoMap.find(subpop_id) != p_subpopInfoMap.end())
EIDOS_TERMINATION << "ERROR (Species::__PrepareSubpopulationsFromTables): subpopulation id (" << subpop_id << ") occurred twice in the subpopulation table." << EidosTerminate();
if (subpop_id != (int)pop_index)
EIDOS_TERMINATION << "ERROR (Species::__PrepareSubpopulationsFromTables): slim_id value " << subpop_id << " occurred at the wrong index in the subpopulation table; entries must be at their corresponding index." << EidosTerminate();
EIDOS_TERMINATION << "ERROR (Species::__PrepareSubpopulationsFromTables): slim_id value " << subpop_id << " occurred at the wrong index in the subpopulation table; entries must be at their corresponding index. This may result from simplification; if so, pass filter_populations=False to simplify()." << EidosTerminate();

p_subpopInfoMap.emplace(subpop_id, ts_subpop_info());
}
Expand Down

0 comments on commit cbc87e7

Please sign in to comment.