Raise more appropriate exception