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

No one assigned

    Labels

    bugSomething isn't workingresolvedThis issue has been resolved.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions