Article 5, Section 4 of 2004/38/EC (an EU-law which is hence not valid in Switzerland) reads as follows:
I´m writing this in the light of the following (unfortunately) true situation:Where a Union citizen, or a family member who is not a national of a Member State, does not have the necessary travel documents or, if required, the necessary visas, the Member State concerned shall, before turning them back, give such persons every reasonable opportunity to obtain the necessary documents or have them brought to them within a reasonable period of time or to corroborate or prove by other means that they are covered by the right of free movement and residence.
A British/Lebanese couple (married), Lebanese part has ILR in the UK, wanted to visit Vienna/Austria from London/UK.
They happened to book a flight with Swiss via Zürich(Switzerland).
LHR - ZRH - VIE - ZRH - LHR
From previous visits to Schengen (amongst others Prag), they thought they do not need a visa.
On the way from London to Vienna, when changing in Zürich, they had to pass the (Swiss) Schengen-Passport-checkpoint in Zürich. They were told that they may NOT enter Switzerland. But since the guard was in a good mood they were allowed to pass anyway, provided they really take their connecting flight to Vienna, which they did. Furthermore they were told that they should NOT return via this route, as this would then be deemed "illegal entry into Switzerland".
On arrival in Vienna they went to the Swiss embassy, trying to obtain a Schengen-visa (how ridiculous is it, having to ask for a Schengen-Visa inside Schegen?), or a Swiss national visa, valid (at least) on the day of intended return.
Contrary to the airport police in Zürich, the Embassy maintained, repeatedly, that a visa for their return is NOT needed.
The story had a happy ending - however this is not likely to be the usual outcome: The airport police in Zürich agreed to talk directly to the Swiss embassy in Vienna, to see if the misunderstanding really happened this way. When the embassy confirmed that, indeed, they gave the incorrect information about NOT needing a visa, the airport police asked for the names of the concerned passengers and agreed to "exceptionally" let them pass on their way from Vienna back to London.
Summary:
When traveling, please know the visa-rules for all countries, even for different Schengen-countries, and even if only transitting. If in doubt, insist on written confirmation from the airline that visas are OK as presented, so you have someone you can hold responsible for mess-ups like this.
Schengen is not always = Schengen!