andrew burke





Exceptions At Montreal-Trudeau

Posted on: 2014-09-19

Quick and Easy

Our trip to Europe, that we had been planning for years, was off to a rough start. We had made it as far as Montreal but then we found out that our flight to Brussels had mechanical problems in Toronto and so had been cancelled.

The gate staff announced that all 300 of us had to go back down to the Air Canada check-in area to get ourselves re-booked and, since the next flight to Brussels wouldn't be until tomorrow, assigned hotel rooms.

But first we had to go through customs and immigration. Since we had passed through security and entered the departures gate area a few hours ago, they explained, we had technically "left Canada" and now needed to "re-enter" the country through official channels. We were all a little incredulous, but they said it would be pretty quick: the customs agents would just have to check our flight cards and passports and wave us through.

So we shrugged and headed to the customs hall. It looked like this:

Montreal-Trudeau Customs Line


But still not a big deal: Montreal-Trudeau is a big enough international hub to have the new streamlined automated terminal system for returning Canadians: the several dozen ATM-style touchscreen machines do preliminary passport and customs form analysis and then sends all the people who would have no passport issues and nothing exceptional to declare to a much faster 'no problems' express lane.

This would have been great - but because we had only "left" the country a few hours ago (and then only technically), we didn't have customs forms to fill out and therefore couldn't use the terminals. Instead, everyone from our flight had to get into the much longer, slower-moving line for foreigners coming to Canada, behind what seemed to be at least one 747 worth of people from very far away.

So we got into the long line, which very quickly snaked up the stairs behind us. As we slowly moved forward, shoving our bags along the ground every few minutes, I had quite a bit of time to think - and I realized that I was a living Exception Case and we were stuck inside a poor Exception Handling Process.

Exceptional Handling

You see, I work in software, and deep down all software programs are systems of processes. Stuff comes in from somewhere. Other stuff goes out to somewhere else. Instructions are followed. Data is checked, confirmed, and sometimes changed. It's all about rules and systems and processes.

Modern air travel is all about processes too. The actual flying and air traffic part is extremely codified and operates remarkably smoothly considering how many flights there are worldwide every day. When bad weather or other kinds of incidents come up, the system adapts itself fairly well. However, the processes that passengers are subjected to often aren't often as flexible or well planned.

In building a software system, you have to take into account the various things that might go wrong, often called "exceptions", and figure out ways to handle these situations. It's sometimes as simple as checking if something is missing and assigning a default value, but exception handling can get quite complicated: what happens if a network connection drops in the middle of a file transfer? If a supposed-to-be-unique invoice number shows up twice?

Most modern languages and frameworks have the concept of "Exception Handling": you can wrap up a process so that if something goes wrong while it runs, it switches to a different process for handling the problem.

If you want to streamline and speed up your software, you often have to make certain assumptions about the data that you're working with. If those assumptions are wrong, you'll end up in an error state and you'll have to switch to a slower, less efficient process.

That's exactly what had happened to us and our cancelled flight. The customs process had been sped up for a common situation (Canadians without much to declare) but it meant that our situation (Canadians who hadn't really left the country) was slower. Not only that, but having several hundred extra people in the regular line slowed down the process for everyone else who arrived behind us, too, whether they could have used the faster machines or not.

These musings on software didn't make the line move much faster for me, though. After about an hour we finally made it to the front of the line and got waved through. Now all we had to do was catch up with an Air Canada agent who would re-book us and get us a hotel room for the night. No problem, right?

The Longer Line

Surprise Late-Night Airport Lineup

Since it was already 10:30pm on a Sunday night, most of the desk staff had gone home. Also, since check-in is such an automated efficient process these days, most of the time they only need a few staff anyhow. So 300 tired and cranky passengers were getting individually crafted rebookings and hotel vouchers from two (and eventually three) desk agents.

This gave me another software insight: if you've automated the 90% of situations, the remaining 10% will end up taking longer than before.

We slowly trudged forward in the line. We chatted with the friendly Belgians in front of us, who it turns out had seen much more of North America than we had.

The Mood Starts To Get Ugly

At one point about an hour in, a woman in front of us asked one of the staff to bring some water or something ("I may be Belgian," she said afterwards, "but sometimes my Dutch side comes out!" I don't really know what she meant. Are the Dutch known for being demanding?). A little while later, an airport staff guy wheeled up a concession cart full of fruit drinks and little plastic glasses next to our line.

Then something interesting happened: the part of the line in front of us self-organized into pourers and servers, and in short order trays of apple juice were being walked up and down the lineup. It was a heartening example of the social contract at work. There's Europeans for you, I thought. But then a Canadian woman behind us decided that this was an outrage: "What, now we have to become waitresses? The airline should be serving us! This is morally wrong!" I had noticed earlier that she seemed to have been spending her time in line orchestrating a social media campaign against Air Canada, so she seemed already primed for outrage.

This outburst didn't seem to change anything, though. The staff were clearly overwhelmed already - the rest of the airport was shutting down and presumably the handful of people left were already on overtime. The affable Belgians continued serving out juice for a while.

But this incident seemed to break something. Until then, everyone had begrudgingly accepted the situation, shuffling along in line and shrugging and joking with their neighbours. Now, the whole feeling had changed. There was more jostling, more complaining. If someone inadvertently seemed to be jumping their place in line, they were shouted back into place. People got more testy with the few airport staff who were still around. It's interesting how mob psychology can shift after a simple trigger. It's also a bit depressing to see how no good deed goes unpunished: the staff brought free beverages, but that then changed the dynamic of expectations and seemed to make the crowd as a whole less happy than they had been before.

After about two hours of standing in line, we finally made it to a tired and harried checkin agent, who rebooked us on a replacement flight the next day, gave us some meal vouchers and a discount flight voucher, and booked us into the Holiday Inn Express in nearby Pointe Claire.

Not Done Yet

We had arrived at the airport around 5:30, and found out our flight was cancelled around 9. It was now midnight. We had spent six and a half hours in various states of waiting - three of them standing in line. We hadn't eaten since lunch-time, so we were happy to find a Subway that was still open and which accepted our vouchers. After that (gently stepping past various sleeping passengers), we just wanted a drink and some sleep. We managed to find an airport shop selling wine - but when we brought the bottle of wine to the counter they told us that they couldn't sell alcohol after 11pm.

So we went outside to wait for our airport shuttle. Happily enough, it was already there. Finally! But: several dozen people had been given rooms at the same hotel in at the same time and the shuttle bus only sat about ten (error handling again!). So it left without us, promising to be back "soon".

By this point, I was so physically exhausted I felt like I was on a boat at sea. We decided that in light of everything it would be worth spending the extra money to get a taxi to the hotel. We just wanted to get to bed. We went back inside and followed the signs to the taxi area - which we could see from way down the hall had a huge lineup of other desperate passengers all trying to get the handful of taxis that had bothered to show up at the airport late a Sunday night.

At this point I admit that I sort of snapped. "I just. Want. To. Stop. Waiting. In. Line! I'm willing to pay stupid money, just to stop waiting - but they won't let me!"


We grudgingly made our way back to the hotel shuttle area, and our shuttle arrived a few minutes after. We boarded and it careened along the rain-slicked highways of western Montreal (had I mentioned that it had started to rain? Of course?) to the Holiday Inn Express. There was no line. The desk clerk got us a nice room, complete with a kitchenette, but more importantly with a very comfortable bed. We fell asleep in very short order. We didn't need any drinks, it turned out.

Happy Sight

The next day went much better.


You would think after this exhausting frustrating incident I'd have it in for Air Canada, but in fact I don't. I've flown Air Canada a lot over the last few decades, and the last time I've had a full-on cancellation from them that required an overnight stay was in the early 90s due to a massive blizzard that shut down most of Toronto. I'd certainly much rather they cancel a flight than try to fly a plane even with mechanical problems. The hours and hours of standing in line were certainly not ideal, though, and a few extra check-in staff would have made a lot of people happier. In these situations, my mantra is always, "At least I'm not flying RyanAir or United!"

Previous: Europe 2014: Starting Out
Next: On Our Way: Montreal to Brussels to Venice