Skip to content

An exception could not be caught when calling XLWorksheet::range on the empty sheet. #382

@JecyG

Description

@JecyG

An exception could not be caught when calling XLWorksheet::range on the empty sheet. The cause of the problem lies in the noexcept specifier of the function XLCellReference XLWorksheet::lastCell() const noexcept, which prevents exception propagation.

XLCellReference XLWorksheet::lastCell() const noexcept { return { rowCount(), columnCount() }; }

XLCellReference::XLCellReference(uint32_t row, uint16_t column)
{
if (!addressIsValid(row, column)) throw XLCellAddressError("Cell reference is invalid");
setRowAndColumn(row, column);
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingready to closePull request has been answered or implemented & is pending closuretestingFunctionality has been implemented in development branch and is pending a merge into main

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions