IF Rope.Match[pattern: "*.alpine", object: server, case:
FALSE]
THEN {
inst ← AlpInstance.Create[fileStore: server, caller: caller, key: key];
trans ← AlpTransaction.Create[inst];
};
result ← performProc[trans: trans, serverForTrans: server, caller: caller, key: key];
EXITS
RPCFailed => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[IO.PutFR["RPC failure: %g", IO.rope[failureName]],NIL]];
};
alpineBusy => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[NARROW["Alpine server is busy - please try again later", ROPE], NIL]];
};
dirInconsistent => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[NARROW["Alpine Interim Directory: directory is inconsistent",ROPE], NIL]];
};
dirError => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[IO.PutFR["Alpine Directory Error: %g",
IO.rope[failureName]],NIL]];
};
interimDirError => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[IO.PutFR["Alpine Interim Directory Error: %g", IO.rope[failureName]],NIL]];
};
accFail => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[IO.PutFR["Alpine denied access because client is not in the %g access control list", IO.rope[failureName]],NIL ]];
};
lockFail => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[NARROW["Alpine server has a conflict or timed out a lock - please try again later", ROPE], NIL]];
};
opFail => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[IO.PutFR["Alpine Instance Operation Failed: %g", IO.rope[failureName]],NIL]];
};
possDamaged => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[NARROW["Alpine server reports possible damage", ROPE], NIL]];
};
alpUnknown => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[IO.PutFR["Alpine Instance Unknown Type: %g", IO.rope[failureName]],NIL]];
};
badOwner => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[NARROW["Alpine Unknown Type: owner -- suspect bad directory, owner or access list name", ROPE], NIL]];
};
badTransID => {
RETURN[CONS[
NARROW["Alpine Unknown Type: transID -- suspect transaction has aborted or that the server has crashed and restarted", ROPE], NIL]];
};
statInvalid => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[NARROW["Alpine Statically Invalid error - suspect unreasonable property value or Yodel bug", ROPE], NIL]];
};
notBound => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[NARROW["unbound error- suspect AlpineUserImpls has not been run", ROPE], NIL]];
};
alpineError => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[IO.PutFR["Alpine error because %g",IO.rope[failureName]],NIL]];
};
FSError => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[
CONS[
IO.PutFR["FS could not perform operation because %g",
IO.rope[failureName]],
NIL]];
};
syntaxError => {
IF trans # NIL THEN outcome ← AlpTransaction.Finish[trans, abort ! RPC.CallFailed => CONTINUE;];
RETURN[CONS[IO.PutFR["Syntax error in input: %g", IO.rope[failureName]],NIL]];
};
};