Event layer function: catch various error cases for line offsets