void SAerror ( unsigned int  code,
string  information,
int  lineNumber 
)

prints static analysis error messages

Outputs error messages triggered by several static tests. The static anaylsis codes are taken from the WS-BPEL 2.0 specification. For each error code, a standard problem description is printed.

Parameters:
code code of the static analysis error
information additional information about the error
lineNumber a line number to locate the error

Definition at line 582 of file debug.cc.

Referenced by WSDL_PortType::addOperation(), check_SA00070(), check_SA00071(), ASTE::checkAttributes(), ASTE::checkAttributeType(), ASTE::checkCorrelationSet(), CFGBlock::checkForCyclicControlDependency(), CFGBlock::checkForCyclicLinks(), ASTE::checkLink(), ASTE::checkMessageExchange(), ASTE::checkPartnerLink(), WSDL::checkVariable(), ASTE::defineCorrelationSet(), ASTE::defineLink(), ASTE::definePartnerLink(), ASTE::defineVariable(), and SAerror().

00583 {
00584   globals::static_analysis_errors++;
00585 
00586   if (!globals::abstract_process)
00587     cerr << colorconsole::fg_red;
00588   else
00589     cerr << colorconsole::fg_magenta;
00590 
00591   cerr << globals::filename;
00592   if (lineNumber != 0)
00593    cerr << ":" << lineNumber;
00594   cerr << " - ";
00595 
00596   cerr << "[SA";
00597   cerr << setfill('0') << setw(5) << code;
00598   cerr << "]\n";
00599 
00600   cerr << colorconsole::fg_standard;
00601 
00602   // [SA00065] is critical
00603   if (code == 65)
00604   {
00605     cleanup();
00606     exit(1);
00607   }
00608 
00609   if (debug_level == TRACE_ERROR)
00610     return;
00611 
00612   switch (code)
00613   {
00614     case(2):
00615       { cerr << "operation `" << information << "' is overloaded in the WSDL file" << endl;
00616         break; }
00617  
00618     case(3):
00619       { cerr << "<catch> must not be applied to the standard fault `" << information << "' when parent scope has attribute `exitOnStandardFault' set to `yes'" << endl;
00620         break; }
00621         
00622     case(5):
00623       { cerr << information << " does not match the portType specified by the combination of partnerLink and role in the WSDL description" << endl;
00624         break; }
00625 
00626     case(6):
00627       { cerr << "<rethrow> activity must only be used within <catch> or <catchAll>" << endl;
00628         break; }
00629 
00630     case(7):
00631       { cerr << "<compensateScope> activity must only be used within an FTC-handler" << endl;
00632         break; }
00633 
00634     case(8):
00635       { cerr << "<compensate> activity must only be used within an FTC-handler" << endl;
00636         break; }
00637         
00638     case(15):
00639       { cerr << "<process> does not contain a start activity" << endl;
00640         break; }
00641 
00642     case(16):
00643       { cerr << "<partnerLink> `" << information << "' neither specifies `myRole' nor `partnerRole'" << endl;
00644         break; }
00645 
00646     case(17):
00647       { cerr << "<partnerLink> `" << information << "' uses `initializePartnerRole' but does not have a partner role" << endl;
00648         break; }
00649 
00650     case(18):
00651       { cerr << "<partnerLink> `" << information << "' already defined in this scope/process" << endl;
00652         break; }
00653 
00654     case(23):
00655       { cerr << "<variable> `" << information << "' already defined in this scope/process" << endl;
00656         break; }
00657 
00658     case(24):
00659       { cerr << "attribute `" << information << "' must be of type `BPELVariableName'" << endl;
00660         break; }
00661 
00662     case(25):
00663       { cerr << "<variable> `" << information << "' must either use `messageType', `type' or `element' attribute" << endl;
00664         break; }
00665         
00666     case(32):
00667       { cerr << "<" << information << "> has an invalid combination of attributes and/or elements" << endl;
00668         break; }
00669 
00670     case(35):
00671       { cerr << "attribute `endpointReference' in <from> element is only allowed to be `myRole' if a `myRole' attribute is definied for the used <partnerLink> `" << information << "'" << endl;
00672         break; }
00673 
00674     case(36):
00675       { cerr << "attribute `endpointReference' in <from> element is only allowed to be `partnerRole' if a `partnerRole' attribute is definied for the used <partnerLink> `"<< information << "'"<< endl;
00676         break; }
00677 
00678     case(37):
00679       { cerr << "<partnerLink> `" << information << "' referenced in a <to> element must define the attribute `partnerRole'" << endl;
00680         break; }
00681 
00682     case(44):
00683       { cerr << "<correlationSet> `" << information << "' already defined in this scope/process" << endl;
00684         break; }
00685 
00686     case(48):
00687       { cerr << "<" << information << "> is using a variable of a wrong messageType" << endl;
00688         break; }
00689 
00690     case(51):
00691       { cerr << "<invoke> must not be used with an inputVariable AND <toPart> elements" << endl;
00692         break; }
00693 
00694     case(52):
00695       { cerr << "<invoke> must not be used with an outputVariable AND <fromPart> elements" << endl;
00696         break; }
00697 
00698     case(55):
00699       { cerr << "<receive> must not be used with a variable AND <fromPart> elements" << endl;
00700         break; }
00701 
00702     case(56):
00703       { cerr << "<" << information << ">: start activity must not be preceeded by another activity" << endl;
00704         break; }
00705 
00706     case(57):
00707       { cerr << "all start activities must share a correlation set with `initiate' set to \"join\"" << endl;
00708         break; }
00709 
00710     case(58):
00711       { cerr << "<" << information << "> is using a variable of a wrong messageType" << endl;
00712         break; }
00713 
00714     case(59):
00715       { cerr << "<reply> must not be used with a variable AND <toPart> elements" << endl;
00716         break; }
00717 
00718     case(60):
00719       { cerr << "could not find an explicit corresponding incoming message activity for the <reply>" << endl;
00720         break; }
00721 
00722     case(61):
00723       { cerr << "messageExchange \"" << information << "\" is not defined in any enclosing scope" << endl;
00724         break; }
00725 
00726     case(62):
00727       { cerr << "<pick> start activity must only contain <onMessage> branches" << endl;
00728         break; }
00729 
00730     case(63):
00731       { cerr << "<onMessage> must not be used with a variable AND <fromPart> elements" << endl;
00732         break; }
00733 
00734     case(64):
00735       { cerr << "<link> `" << information << "' already defined in this <flow>" << endl;
00736         break; }
00737         
00738     case(65):
00739       { cerr << "<link> `" << information << "' was not defined before" << endl;
00740         break; }
00741 
00742     case(66):
00743       { cerr << "<link> `" << information << "' must be used exactly once as source and target" << endl;
00744         break; }
00745 
00746     case(67):
00747       { cerr << "<link> " << information << " connect the same activity" << endl;
00748         break; }
00749 
00750     case(68):
00751       { cerr << information << " more than once as source" << endl;
00752         break; }
00753 
00754     case(69):
00755       { cerr << information << " more than once as target" << endl;
00756         break; }
00757 
00758     case(70):
00759       { cerr << "<link> `" << information << "' crosses boundary of a repeatable construct or of a compensation handler" << endl;
00760         break; }
00761 
00762     case(71):
00763       { cerr << "<link> `" << information << "' crosses boundary of a fault handler or a termination handler, but is inbound" << endl;
00764         break; }
00765 
00766     case(72):
00767       { cerr << "<link> `" << information << "' closes a control cycle" << endl;
00768         break; }
00769 
00770     case(73):
00771       { cerr << "<link> `" << information << "' used in a join condition is not an incoming link of this activity" << endl;
00772         break; }
00773 
00774     case(74):
00775       { cerr << information << endl;
00776         break; }
00777 
00778     case(75):
00779       { cerr << "<forEach>'s constant <completionCondition> can never be fulfilled" << endl;
00780         break; }
00781 
00782     case(76):
00783       { cerr << "<variable> `" << information << "' hides enclosing <forEach>'s `counterName'" << endl;
00784         break; }
00785 
00786     case(77):
00787       { cerr << "<scope> `" << information << "' is not immediately enclosed to current scope" << endl;
00788         break; }
00789 
00790     case(78):
00791       { cerr << "`" << information << "' does not refer to a <scope> or an <invoke> activity" << endl;
00792         break; }
00793 
00794     case(79):
00795       { cerr << "root <scope> inside <" << information << "> must not have a <compensationHandler>" << endl;
00796         break; }
00797 
00798     case(80):
00799        { cerr << "<faultHandlers> have no <catch> or <catchAll> element" << endl;
00800          break; }
00801 
00802     case(81):
00803        { cerr << "<catch> attribute " << information << endl;
00804          break; }
00805 
00806     case(82):
00807        { cerr << "peer-scope dependency relation must not include cycles" << endl;
00808          break; }
00809 
00810     case(83):
00811        { cerr << "<eventHandlers> have neither <onEvent> nor <onAlarm> element" << endl;
00812          break; }
00813 
00814     case(84):
00815        { cerr << "partnerLink reference `" << information << "' of <onEvent> cannot be resolved" << endl;
00816          break; }
00817 
00818     case(87):
00819       { cerr << "<" << information << "> is using a variable of a wrong messageType" << endl;
00820         break; }
00821 
00822     case(88):
00823        { cerr << "<correlation> reference `" << information << "' of <onEvent> cannot be resolved" << endl;
00824          break; }
00825 
00826     case(91):
00827        { cerr << "an isolated <scope> may not contain other isolated scopes" << endl;
00828          break; }
00829 
00830     case(92):
00831        { cerr << "<scope> with name `" << information << "' defined twice" << endl;
00832          break; }
00833 
00834     case(93):
00835        { cerr << "<catch> construct defined twice" << endl;
00836          break; }
00837 
00838     default:
00839          cerr << endl;
00840   }
00841 
00842   cerr << endl;
00843 }

Here is the caller graph for this function:


Generated on Thu Jan 24 04:01:02 2008 for GNU BPEL2oWFN by  doxygen 1.5.2