Merge branch 'ht/graphs'
[shapes.git] / source / shapesexceptions.h
blob0507a4bb6fda2e456d05288da7a5a0a6e8c03684
1 /* This file is part of Shapes.
3 * Shapes is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * any later version.
8 * Shapes is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 * Copyright 2008, 2009, 2013, 2014, 2015 Henrik Tidefelt
19 #pragma once
21 #include "Shapes_Ast_decls.h"
22 #include "Shapes_Lang_decls.h"
23 #include "Shapes_Kernel_decls.h"
24 #include "Shapes_Exceptions_decls.h"
26 #include "sourcelocation.h"
27 #include "corelocation.h"
28 #include "identifier.h"
29 #include "exitcodes.h"
30 #include "methodid.h"
31 #include "simplepdfo.h"
32 #include "strrefdup.h" /* this is not needed in this file, but it is convenient to get these declarations for users of this file. */
33 #include "pdfversion.h"
35 #include <exception>
36 #include <iostream>
37 #include <sstream>
38 #include <list>
39 #include <set>
40 #include <map>
43 namespace Shapes
46 namespace Interaction
49 class MessageString
51 const char * msg_;
52 RefCountPtr< const char > msgMem_;
53 public:
54 MessageString( );
55 MessageString( const char * msg );
56 MessageString( const RefCountPtr< const char > & msg );
58 bool null( ) const { return msg_ == NULL; }
59 void show( std::ostream & os ) const;
60 void show( const std::string & eachLinePrefix, std::ostream & os ) const;
63 std::ostream & operator << ( std::ostream & os, const MessageString & self );
67 namespace Exceptions
69 extern const std::string additionalLinesPrefix;
71 class Exception
73 public:
74 Exception( );
75 virtual ~Exception( );
76 virtual void display( std::ostream & os ) const = 0;
77 virtual Interaction::ExitCode exitCode( ) const = 0;
78 static const char * locsep;
81 class NotImplemented : public Exception
83 const char * functionality_;
84 public:
85 NotImplemented( const char * functionality );
86 virtual ~NotImplemented( );
87 virtual void display( std::ostream & os ) const;
88 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_NOT_IMPLEMENTED; }
91 class StaticInconsistency : public Exception
93 protected:
94 const Ast::SourceLocation & primaryLoc_;
95 public:
96 StaticInconsistency( const Ast::SourceLocation & primaryLoc ) : primaryLoc_( primaryLoc ) { }
97 virtual ~StaticInconsistency( ) { }
98 const Ast::SourceLocation & loc( ) const { return primaryLoc_; }
99 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_USER_ERROR; }
102 class PostCondition : public Exception
104 protected:
105 const Ast::SourceLocation & primaryLoc_;
106 public:
107 PostCondition( const Ast::SourceLocation & primaryLoc ) : primaryLoc_( primaryLoc ) { }
108 virtual ~PostCondition( ) { }
109 const Ast::SourceLocation & loc( ) const { return primaryLoc_; }
110 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_USER_ERROR; }
113 class MiscellaneousStaticInconsistency : public StaticInconsistency
115 Interaction::MessageString msg_;
116 public:
117 MiscellaneousStaticInconsistency( const Ast::SourceLocation & loc, const Interaction::MessageString & msg );
118 virtual ~MiscellaneousStaticInconsistency( );
119 virtual void display( std::ostream & os ) const;
122 class NamespaceDirectoryError : public StaticInconsistency
124 Interaction::MessageString msg_;
125 public:
126 NamespaceDirectoryError( const Ast::SourceLocation & loc, const Interaction::MessageString & msg );
127 virtual ~NamespaceDirectoryError( );
128 virtual void display( std::ostream & os ) const;
131 class AmbiguousNamespaceDirectory : public StaticInconsistency
133 std::string previousName_;
134 std::string currentDir_;
135 public:
136 AmbiguousNamespaceDirectory( const std::string & previousName, const std::string & currentDir );
137 virtual ~AmbiguousNamespaceDirectory( );
138 virtual void display( std::ostream & os ) const;
141 class NamespaceDirectoryLookupError : public StaticInconsistency
143 public:
144 enum Type{ NOT_FOUND, WRONG_TYPE, GLOBAL };
145 private:
146 Type type_;
147 Ast::NamespacePath namespacePath_;
148 public:
149 NamespaceDirectoryLookupError( const Ast::SourceLocation & loc, Type type, const Ast::NamespacePath::const_iterator & nsBegin, const Ast::NamespacePath::const_iterator & nsEnd );
150 NamespaceDirectoryLookupError( Type type, const Ast::NamespacePath::const_iterator & nsBegin, const Ast::NamespacePath::const_iterator & nsEnd );
151 virtual ~NamespaceDirectoryLookupError( );
152 virtual void display( std::ostream & os ) const;
155 class NamespaceDirectoryFileError : public StaticInconsistency
157 public:
158 enum Type{ NOT_FOUND, WRONG_TYPE };
159 private:
160 Type type_;
161 Ast::NamespacePath namespacePath_;
162 std::string filename_;
163 public:
164 NamespaceDirectoryFileError( const Ast::SourceLocation & loc, Type type, const Ast::NamespacePath & namespacePath, const std::string & filename );
165 NamespaceDirectoryFileError( Type type, const Ast::NamespacePath & namespacePath, const std::string & filename );
166 virtual ~NamespaceDirectoryFileError( );
167 virtual void display( std::ostream & os ) const;
170 class NamespaceDirectoryInvalidEntries : public StaticInconsistency
172 RefCountPtr< const Ast::NamespacePath > namespacePath_;
173 std::set< std::string > invalidEntries_;
174 public:
175 NamespaceDirectoryInvalidEntries( const RefCountPtr< const Ast::NamespacePath > & namespacePath, const std::set< std::string > & invalidEntries );
176 virtual ~NamespaceDirectoryInvalidEntries( );
177 virtual void display( std::ostream & os ) const;
180 class NamespaceDirectoryCircularOrdering : public StaticInconsistency
182 RefCountPtr< const Ast::NamespacePath > namespacePath_;
183 std::string cycleEntry_;
184 public:
185 NamespaceDirectoryCircularOrdering( const RefCountPtr< const Ast::NamespacePath > & namespacePath, const std::string & cycleEntry );
186 virtual ~NamespaceDirectoryCircularOrdering( );
187 virtual void display( std::ostream & os ) const;
190 class ScannerError : public StaticInconsistency
192 Interaction::MessageString msg_;
193 public:
194 ScannerError( const Ast::SourceLocation & loc, const Interaction::MessageString & msg );
195 virtual ~ScannerError( );
196 virtual void display( std::ostream & os ) const;
199 class ParserError : public StaticInconsistency
201 Interaction::MessageString msg_;
202 bool justAWarning_;
203 public:
204 ParserError( const Ast::SourceLocation & loc, const Interaction::MessageString & msg, bool justAWarning = false );
205 virtual ~ParserError( );
206 virtual void display( std::ostream & os ) const;
209 class MemberAlsoAbstract : public StaticInconsistency
211 const char * id_;
212 const Ast::SourceLocation & abstractLoc_;
213 public:
214 MemberAlsoAbstract( const Ast::SourceLocation & memberLoc, const char * id, const Ast::SourceLocation & abstractLoc );
215 virtual ~MemberAlsoAbstract( );
216 virtual void display( std::ostream & os ) const;
219 class MemberAlreadyDeclared : public StaticInconsistency
221 const char * id_;
222 const Ast::SourceLocation & oldLoc_;
223 public:
224 MemberAlreadyDeclared( const Ast::SourceLocation & memberLoc, const char * id, const Ast::SourceLocation & oldLoc );
225 virtual ~MemberAlreadyDeclared( );
226 virtual void display( std::ostream & os ) const;
229 class PublicGetSetInNonfinalClass : public StaticInconsistency
231 const char * id_;
232 public:
233 PublicGetSetInNonfinalClass( const Ast::SourceLocation & memberLoc, const char * id );
234 virtual ~PublicGetSetInNonfinalClass( );
235 virtual void display( std::ostream & os ) const;
238 class TransformingMemberInNonfinalClass : public StaticInconsistency
240 const char * id_;
241 public:
242 TransformingMemberInNonfinalClass( const Ast::SourceLocation & memberLoc, const char * id );
243 virtual ~TransformingMemberInNonfinalClass( );
244 virtual void display( std::ostream & os ) const;
247 class RepeatedFormal : public StaticInconsistency
249 const char * id_;
250 public:
251 RepeatedFormal( const Ast::SourceLocation & loc, const char * id );
252 virtual ~RepeatedFormal( );
253 virtual void display( std::ostream & os ) const;
256 class StateUninitializedUse : public StaticInconsistency
258 const Ast::PlacedIdentifier * id_;
259 const Ast::Node * decl_;
260 public:
261 StateUninitializedUse( const Ast::SourceLocation & loc, const Ast::PlacedIdentifier * id, const Ast::Node * decl );
262 virtual ~StateUninitializedUse( );
263 virtual void display( std::ostream & os ) const;
266 class IllegalFreeStates : public StaticInconsistency
268 Ast::StateIDSet * freeStates_;
269 const char * reason_;
270 public:
271 IllegalFreeStates( const Ast::SourceLocation & loc, Ast::StateIDSet * freeStates, const char * reason );
272 virtual ~IllegalFreeStates( );
273 virtual void display( std::ostream & os ) const;
276 class FreeStateIsAlsoPassed : public StaticInconsistency
278 Ast::StateID stateID_;
279 public:
280 FreeStateIsAlsoPassed( const Ast::SourceLocation & loc, Ast::StateID stateID );
281 virtual ~FreeStateIsAlsoPassed( );
282 virtual void display( std::ostream & os ) const;
285 class RepeatedStateArgument : public StaticInconsistency
287 RefCountPtr< Ast::StateIDSet > passedStates_;
288 public:
289 RepeatedStateArgument( const Ast::SourceLocation & loc, const RefCountPtr< Ast::StateIDSet > & passedStates );
290 virtual ~RepeatedStateArgument( );
291 virtual void display( std::ostream & os ) const;
294 class PassingStateOut : public StaticInconsistency
296 const char * id_;
297 public:
298 PassingStateOut( const Ast::SourceLocation & loc, const char * id );
299 virtual ~PassingStateOut( );
300 virtual void display( std::ostream & os ) const;
303 class IntroducingExisting : public StaticInconsistency
305 Ast::PlacedIdentifier id_;
306 public:
307 IntroducingExisting( const Ast::SourceLocation & loc, const Ast::PlacedIdentifier & id );
308 virtual ~IntroducingExisting( );
309 virtual void display( std::ostream & os ) const;
312 class NamespaceAliasCollision : public StaticInconsistency
314 const Ast::IdentifierTree * tree_;
315 const char * name_;
316 public:
317 NamespaceAliasCollision( const Ast::SourceLocation & loc, const Ast::IdentifierTree * tree, const char * name );
318 virtual ~NamespaceAliasCollision( );
319 virtual void display( std::ostream & os ) const;
322 class EncapsulationIntroducingExisting : public StaticInconsistency
324 const char * id_;
325 public:
326 EncapsulationIntroducingExisting( const Ast::SourceLocation & loc, const char * id );
327 virtual ~EncapsulationIntroducingExisting( );
328 virtual void display( std::ostream & os ) const;
331 class EncapsulationNamespaceAliasCollision : public StaticInconsistency
333 const char * id_;
334 public:
335 EncapsulationNamespaceAliasCollision( const Ast::SourceLocation & loc, const char * id );
336 virtual ~EncapsulationNamespaceAliasCollision( );
337 virtual void display( std::ostream & os ) const;
340 class FreezingUndefined : public StaticInconsistency
342 Ast::PlacedIdentifier id_;
343 public:
344 FreezingUndefined( const Ast::SourceLocation & loc, const Ast::PlacedIdentifier & id );
345 virtual ~FreezingUndefined( );
346 virtual void display( std::ostream & os ) const;
349 class UndefinedNamespace : public StaticInconsistency
351 Ast::NamespaceReference id_;
352 public:
353 UndefinedNamespace( const Ast::SourceLocation & loc, const Ast::NamespaceReference & id );
354 virtual ~UndefinedNamespace( );
355 virtual void display( std::ostream & os ) const;
358 class ExpectedImmediate : public StaticInconsistency
360 public:
361 ExpectedImmediate( const Ast::SourceLocation & loc );
362 virtual ~ExpectedImmediate( );
363 virtual void display( std::ostream & os ) const;
366 class IllegalImperative : public StaticInconsistency
368 public:
369 IllegalImperative( const Ast::SourceLocation & loc );
370 virtual ~IllegalImperative( );
371 virtual void display( std::ostream & os ) const;
374 class FileReadOpenError : public Exception
376 public:
377 enum Type{ OPEN, STAT };
378 private:
379 const Ast::SourceLocation & loc_;
380 RefCountPtr< const char > filename_;
381 Type type_;
382 const std::string * sourceDir_;
383 const std::list< std::string > * searchPath_;
384 public:
385 FileReadOpenError( const Ast::SourceLocation & loc, RefCountPtr< const char > filename, const std::string * sourceDir, const std::list< std::string > * searchPath, Type type = OPEN );
386 virtual ~FileReadOpenError( );
387 virtual void display( std::ostream & os ) const;
388 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_INPUT_FILE_ERROR; }
391 class FileWriteOpenError : public Exception
393 private:
394 const Ast::SourceLocation & loc_;
395 RefCountPtr< const char > filename_;
396 const char * purpose_;
397 public:
398 FileWriteOpenError( const Ast::SourceLocation & loc, RefCountPtr< const char > filename, const char * purpose = 0 );
399 virtual ~FileWriteOpenError( );
400 virtual void display( std::ostream & os ) const;
401 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_OUTPUT_FILE_ERROR; }
404 class TeXSetupTooLate : public Exception
406 const Ast::SourceLocation & loc_;
407 public:
408 TeXSetupTooLate( const Ast::SourceLocation & loc );
409 virtual ~TeXSetupTooLate( );
410 virtual void display( std::ostream & os ) const;
411 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_USER_ERROR; }
414 class EmptyFinalPicture : public Exception
416 public:
417 EmptyFinalPicture( );
418 virtual ~EmptyFinalPicture( );
419 virtual void display( std::ostream & os ) const;
420 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_USER_ERROR; }
423 class RuntimeError : public Exception
425 protected:
426 const Ast::SourceLocation & loc_;
427 public:
428 RuntimeError( const Ast::SourceLocation & loc );
429 RuntimeError( Ast::Expression * expr );
430 const Ast::SourceLocation & getLoc( ) const;
431 virtual ~RuntimeError( );
432 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_USER_ERROR; } /* This should be overridden when apropriate! */
435 class CatchableError : public RuntimeError
437 public:
438 CatchableError( const Ast::SourceLocation & loc );
439 CatchableError( Ast::Expression * expr );
440 virtual ~CatchableError( );
441 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const = 0;
444 class UncaughtError : public RuntimeError
446 RefCountPtr< const Lang::Exception > ball_;
447 public:
448 UncaughtError( const RefCountPtr< const Lang::Exception > & ball );
449 virtual ~UncaughtError( );
450 virtual void display( std::ostream & os ) const;
451 virtual Interaction::ExitCode exitCode( ) const;
452 const RefCountPtr< const Lang::Exception > & ball( ) const { return ball_; }
455 class UserError : public CatchableError
457 RefCountPtr< const Lang::Symbol > kind_;
458 RefCountPtr< const Lang::String > source_;
459 RefCountPtr< const Lang::Value > details_;
460 Interaction::MessageString message_;
461 public:
462 UserError( const RefCountPtr< const Lang::Symbol > & kind, const RefCountPtr< const Lang::String > & source, const RefCountPtr< const Lang::Value > & details, const Interaction::MessageString & message );
463 virtual ~UserError( );
464 virtual void display( std::ostream & os ) const;
465 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
466 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_USER_DETECTED_ERROR; }
469 class InternalError : public RuntimeError
471 protected:
472 Interaction::MessageString msg_;
473 bool justAWarning_;
474 public:
475 InternalError( const Ast::SourceLocation & loc, const Interaction::MessageString & msg, bool justAWarning = false );
476 InternalError( const Interaction::MessageString & msg, bool justAWarning = false );
477 InternalError( const std::ostringstream & msg, bool justAWarning = false );
478 virtual ~InternalError( );
479 virtual void display( std::ostream & os ) const;
480 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_INTERNAL_ERROR; }
483 class ExternalError : public CatchableError
485 Interaction::MessageString msg_;
486 bool justAWarning_;
487 public:
488 ExternalError( const Interaction::MessageString & msg, bool justAWarning = false );
489 virtual ~ExternalError( );
490 virtual void display( std::ostream & os ) const;
491 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
492 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_EXTERNAL_ERROR; }
493 ExternalError * cloneTyped( ) const;
496 class InternalErrorIn : public InternalError
498 Ast::PlacedIdentifier id_;
499 public:
500 InternalErrorIn( const Ast::PlacedIdentifier & id, const Interaction::MessageString & msg, bool justAWarning = false );
501 virtual ~InternalErrorIn( );
502 virtual void display( std::ostream & os ) const;
503 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_INTERNAL_ERROR; }
506 class TeXSetupHasChanged : public InternalError
508 public:
509 TeXSetupHasChanged( );
510 virtual ~TeXSetupHasChanged( );
513 class MiscellaneousRequirement : public CatchableError
515 Interaction::MessageString msg_;
516 public:
517 MiscellaneousRequirement( const Interaction::MessageString & msg );
518 virtual ~MiscellaneousRequirement( );
519 virtual void display( std::ostream & os ) const;
520 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
523 class HandlerError : public CatchableError
525 Interaction::MessageString msg_;
526 public:
527 HandlerError( const Interaction::MessageString & msg );
528 virtual ~HandlerError( );
529 virtual void display( std::ostream & os ) const;
530 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
533 class PDFVersionError : public CatchableError
535 SimplePDF::PDF_Version::Version version_;
536 SimplePDF::PDF_Version::Version required_;
537 Interaction::MessageString msg_;
538 bool justAWarning_;
539 public:
540 PDFVersionError( SimplePDF::PDF_Version::Version version, SimplePDF::PDF_Version::Version required, const Interaction::MessageString & msg, bool justAWarning = false );
541 virtual ~PDFVersionError( );
542 virtual void display( std::ostream & os ) const;
543 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
546 class RedefiningLexical : public RuntimeError
548 Ast::PlacedIdentifier id_;
549 public:
550 RedefiningLexical( const Ast::PlacedIdentifier & id );
551 virtual ~RedefiningLexical( );
552 virtual void display( std::ostream & os ) const;
555 class RedefiningDynamic : public RuntimeError
557 Ast::PlacedIdentifier id_;
558 public:
559 RedefiningDynamic( const Ast::PlacedIdentifier & id );
560 virtual ~RedefiningDynamic( );
561 virtual void display( std::ostream & os ) const;
564 class TypeMismatch : public RuntimeError
566 const char * hint_;
567 RefCountPtr< const char > valueType_;
568 RefCountPtr< const char > expectedType_;
569 public:
570 TypeMismatch( const Ast::SourceLocation & loc, const char * hint, RefCountPtr< const char > valueType, RefCountPtr< const char > expectedType );
571 TypeMismatch( const Ast::SourceLocation & loc, RefCountPtr< const char > valueType, RefCountPtr< const char > expectedType );
572 virtual ~TypeMismatch( );
573 virtual void display( std::ostream & os ) const;
576 class ExpectedList : public RuntimeError
578 size_t index_;
579 RefCountPtr< const char > nonListType_;
580 public:
581 ExpectedList( const Ast::SourceLocation & loc, size_t index, RefCountPtr< const char > nonListType );
582 virtual ~ExpectedList( );
583 virtual void display( std::ostream & os ) const;
586 class NonObjectMemberAssignment : public RuntimeError
588 RefCountPtr< const char > valueType_;
589 public:
590 NonObjectMemberAssignment( const Ast::SourceLocation & loc, RefCountPtr< const char > valueType );
591 virtual ~NonObjectMemberAssignment( );
592 virtual void display( std::ostream & os ) const;
595 class ElementaryWithout : public RuntimeError
597 public:
598 enum Kind{ VALUE, STATE };
599 enum Ref{ FIELD, MUTATOR };
600 private:
601 Kind kind_;
602 Ref ref_;
603 RefCountPtr< const char > valueType_;
604 public:
605 ElementaryWithout( Kind kind, Ref ref, RefCountPtr< const char > valueType );
606 virtual ~ElementaryWithout( );
607 virtual void display( std::ostream & os ) const;
610 class NonExistentMember : public RuntimeError
612 RefCountPtr< const char > valueType_;
613 const char * fieldID_;
614 public:
615 NonExistentMember( RefCountPtr< const char > valueType, const char * fieldID );
616 virtual ~NonExistentMember( );
617 virtual void display( std::ostream & os ) const;
620 class NonExistentMutator : public RuntimeError
622 RefCountPtr< const char > valueType_;
623 const char * mutatorID_;
624 public:
625 NonExistentMutator( RefCountPtr< const char > valueType, const char * mutatorID );
626 virtual ~NonExistentMutator( );
627 virtual void display( std::ostream & os ) const;
630 class NonExistentPosition : public RuntimeError
632 size_t pos_;
633 size_t maxPos_;
634 public:
635 NonExistentPosition( size_t pos, size_t maxPos );
636 virtual ~NonExistentPosition( );
637 virtual void display( std::ostream & os ) const;
640 class UnaryPrefixNotApplicable : public RuntimeError
642 const Ast::Expression * expr_;
643 RefCountPtr< const char > valueType_;
644 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
645 public:
646 UnaryPrefixNotApplicable( const Ast::SourceLocation & loc, const Ast::Expression * expr, RefCountPtr< const char > valueType );
647 virtual ~UnaryPrefixNotApplicable( );
648 void setCoreLocation( const RefCountPtr< const Interaction::CoreLocation > & coreLoc );
649 virtual void display( std::ostream & os ) const;
652 class UnaryPostfixNotApplicable : public RuntimeError
654 const Ast::Expression * expr_;
655 RefCountPtr< const char > valueType_;
656 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
657 public:
658 UnaryPostfixNotApplicable( const Ast::SourceLocation & loc, const Ast::Expression * expr, RefCountPtr< const char > valueType );
659 virtual ~UnaryPostfixNotApplicable( );
660 void setCoreLocation( const RefCountPtr< const Interaction::CoreLocation > & coreLoc );
661 virtual void display( std::ostream & os ) const;
664 class BinaryInfixNotApplicable : public RuntimeError
666 const Ast::Expression * expr1_;
667 RefCountPtr< const char > valueType1_;
668 const Ast::Expression * expr2_;
669 RefCountPtr< const char > valueType2_;
670 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
671 public:
672 BinaryInfixNotApplicable( const Ast::SourceLocation & loc, const Ast::Expression * expr1, RefCountPtr< const char > valueType1, const Ast::Expression * expr2, RefCountPtr< const char > valueType2 );
673 virtual ~BinaryInfixNotApplicable( );
674 void setCoreLocation( const RefCountPtr< const Interaction::CoreLocation > & coreLoc );
675 virtual void display( std::ostream & os ) const;
678 class LookupUnknown : public StaticInconsistency
680 Ast::Identifier id_;
681 Ast::Identifier::Type type_;
682 public:
683 LookupUnknown( const Ast::SourceLocation & loc, const Ast::Identifier & id, Ast::Identifier::Type type );
684 virtual ~LookupUnknown( );
685 virtual void display( std::ostream & os ) const;
688 class LookupUnknownPrivateAlias : public StaticInconsistency
690 Ast::PlacedIdentifier id_;
691 Ast::Identifier::Type type_;
692 public:
693 LookupUnknownPrivateAlias( const Ast::SourceLocation & loc, const Ast::PlacedIdentifier & id, Ast::Identifier::Type type );
694 virtual ~LookupUnknownPrivateAlias( );
695 virtual void display( std::ostream & os ) const;
698 class StateBeyondFunctionBoundary : public StaticInconsistency
700 Ast::Identifier id_;
701 public:
702 StateBeyondFunctionBoundary( const Ast::SourceLocation & loc, const Ast::Identifier & id );
703 virtual ~StateBeyondFunctionBoundary( );
704 virtual void display( std::ostream & os ) const;
707 class IntroducingExistingUnit : public StaticInconsistency
709 RefCountPtr< const char > id_;
710 public:
711 IntroducingExistingUnit( const Ast::SourceLocation & loc, RefCountPtr< const char > id );
712 virtual ~IntroducingExistingUnit( );
713 virtual void display( std::ostream & os ) const;
716 class LookupUnknownUnit : public StaticInconsistency
718 RefCountPtr< const char > id_;
719 public:
720 LookupUnknownUnit( const Ast::SourceLocation & loc, RefCountPtr< const char > id );
721 virtual ~LookupUnknownUnit( );
722 virtual void display( std::ostream & os ) const;
725 class OutOfRange : public CatchableError
727 Interaction::MessageString msg_;
728 public:
729 OutOfRange( const Interaction::MessageString & msg );
730 OutOfRange( const Ast::SourceLocation & loc, const Interaction::MessageString & msg );
731 virtual ~OutOfRange( );
732 virtual void display( std::ostream & os ) const;
733 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
736 class FontProblem : public CatchableError
738 RefCountPtr< const Lang::Symbol > PostScript_name_;
739 Interaction::MessageString msg_;
740 bool justAWarning_;
741 public:
742 FontProblem( const RefCountPtr< const Lang::Symbol > & PostScript_name, const Interaction::MessageString & msg, bool justAWarning = false );
743 FontProblem( const RefCountPtr< const Lang::Symbol > & PostScript_name, const Ast::SourceLocation & loc, const Interaction::MessageString & msg, bool justAWarning = false );
744 virtual ~FontProblem( );
745 virtual void display( std::ostream & os ) const;
746 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
749 class NonVoidStatement : public RuntimeError
751 RefCountPtr< const Lang::Value > val_;
752 public:
753 NonVoidStatement( const Ast::SourceLocation & loc, RefCountPtr< const Lang::Value > val );
754 virtual ~NonVoidStatement( );
755 virtual void display( std::ostream & os ) const;
758 class UserArityMismatch : public RuntimeError
760 public:
761 enum Type{ VARIABLE, STATE };
762 private:
763 const Ast::SourceLocation & formalsLoc_;
764 const size_t functionArity_;
765 const size_t callArity_;
766 const Type type_;
767 public:
768 UserArityMismatch( const Ast::SourceLocation & callLoc, const Ast::SourceLocation & formalsLoc, size_t functionArity, size_t callArity, const Type type );
769 virtual ~UserArityMismatch( );
770 virtual void display( std::ostream & os ) const;
773 class SinkRequired : public RuntimeError
775 private:
776 const Ast::SourceLocation & formalsLoc_;
777 const size_t formalsArity_;
778 const size_t callArity_;
779 public:
780 SinkRequired( const Ast::SourceLocation & formalsLoc, size_t formalsArity, size_t callArity );
781 virtual ~SinkRequired( );
782 virtual void display( std::ostream & os ) const;
785 class NamedFormalMismatch : public RuntimeError
787 public:
788 enum Type{ VARIABLE, STATE };
789 private:
790 const Ast::SourceLocation & formalsLoc_;
791 RefCountPtr< const char > name_;
792 Type type_;
793 public:
794 NamedFormalMismatch( const Ast::SourceLocation & formalsLoc, RefCountPtr< const char > name, Type type );
795 virtual ~NamedFormalMismatch( );
796 virtual void display( std::ostream & os ) const;
799 class NamedFormalAlreadySpecified : public RuntimeError
801 public:
802 enum Type{ VARIABLE, STATE };
803 private:
804 const Ast::SourceLocation & formalsLoc_;
805 RefCountPtr< const char > name_;
806 size_t pos_;
807 Type type_;
808 public:
809 NamedFormalAlreadySpecified( const Ast::SourceLocation & formalsLoc, RefCountPtr< const char > name, size_t pos, Type type );
810 virtual ~NamedFormalAlreadySpecified( );
811 virtual void display( std::ostream & os ) const;
814 class MissingArguments : public RuntimeError
816 const Ast::SourceLocation & formalsLoc_;
817 RefCountPtr< const std::map< size_t, RefCountPtr< const char > > > missingVariables_;
818 RefCountPtr< const std::map< size_t, RefCountPtr< const char > > > missingStates_;
819 public:
820 MissingArguments( const Ast::SourceLocation & callLoc, const Ast::SourceLocation & formalsLoc, std::map< size_t, RefCountPtr< const char > > * missingVariables, std::map< size_t, RefCountPtr< const char > > * missingStates );
821 ~MissingArguments( );
822 virtual void display( std::ostream & os ) const;
825 class CoreArityMismatch : public RuntimeError
827 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
828 const size_t functionArityLow_;
829 const size_t functionArityHigh_;
830 const size_t callArity_;
831 public:
832 CoreArityMismatch( const RefCountPtr< const Interaction::CoreLocation > & coreLoc, size_t functionArity, size_t callArity );
833 CoreArityMismatch( Interaction::CoreLocation * coreLoc, size_t functionArity, size_t callArity ); /* Transfers ownership. */
834 CoreArityMismatch( const RefCountPtr< const Interaction::CoreLocation > & coreLoc, size_t functionArityLow, size_t functionArityHigh, size_t callArity );
835 /* Convenience constructors for the most common use cases. */
836 CoreArityMismatch( const Ast::PlacedIdentifier & coreId, size_t functionArity, size_t callArity );
837 CoreArityMismatch( const Ast::PlacedIdentifier & coreId, size_t functionArityLow, size_t functionArityHigh, size_t callArity );
838 CoreArityMismatch( const char * coreSyntax, size_t functionArity, size_t callArity );
839 virtual ~CoreArityMismatch( );
840 virtual void display( std::ostream & os ) const;
843 class CoreNoNamedFormals : public RuntimeError
845 const char * what_;
846 public:
847 CoreNoNamedFormals( const char * what );
848 virtual ~CoreNoNamedFormals( );
849 virtual void display( std::ostream & os ) const;
852 class CoreTypeMismatch : public RuntimeError
854 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
855 const Ast::SourceLocation & argLoc_;
856 RefCountPtr< const char > valueType_;
857 RefCountPtr< const char > expectedType_;
858 public:
859 CoreTypeMismatch( const Ast::SourceLocation & callLoc,
860 Interaction::CoreLocation * coreLoc, /* Transfers ownership. */
861 const Ast::SourceLocation & argLoc,
862 RefCountPtr< const char > valueType,
863 RefCountPtr< const char > expectedType );
864 CoreTypeMismatch( const Ast::SourceLocation & callLoc,
865 const RefCountPtr< const Interaction::CoreLocation > & coreLoc,
866 Kernel::Arguments & args,
867 size_t argNo,
868 RefCountPtr< const char > expectedType );
869 CoreTypeMismatch( const Ast::SourceLocation & callLoc,
870 Interaction::CoreLocation * coreLoc, /* Transfers ownership. */
871 Kernel::Arguments & args,
872 size_t argNo,
873 RefCountPtr< const char > expectedType );
874 /* Convenience constructor for the most common use case. */
875 CoreTypeMismatch( const Ast::SourceLocation & callLoc,
876 const Ast::PlacedIdentifier & coreId,
877 Kernel::Arguments & args,
878 size_t argNo,
879 RefCountPtr< const char > expectedType );
880 virtual ~CoreTypeMismatch( );
881 virtual void display( std::ostream & os ) const;
884 class CoreDynamicTypeMismatch : public RuntimeError
886 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
887 Ast::PlacedIdentifier id_;
888 RefCountPtr< const char > valueType_;
889 RefCountPtr< const char > expectedType_;
890 public:
891 CoreDynamicTypeMismatch( const Ast::SourceLocation & callLoc,
892 const Ast::PlacedIdentifier & coreId,
893 const Ast::PlacedIdentifier & id,
894 RefCountPtr< const char > valueType,
895 RefCountPtr< const char > expectedType );
896 virtual ~CoreDynamicTypeMismatch( );
897 virtual void display( std::ostream & os ) const;
900 class CoreStateTypeMismatch : public RuntimeError
902 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
903 const Ast::SourceLocation & argLoc_;
904 RefCountPtr< const char > valueType_;
905 RefCountPtr< const char > expectedType_;
906 public:
907 CoreStateTypeMismatch( const Ast::SourceLocation & callLoc,
908 const Ast::PlacedIdentifier & coreId,
909 const Ast::SourceLocation & argLoc,
910 RefCountPtr< const char > valueType,
911 RefCountPtr< const char > expectedType );
912 virtual ~CoreStateTypeMismatch( );
913 virtual void display( std::ostream & os ) const;
916 class ContinuationTypeMismatch : public RuntimeError
918 RefCountPtr< const char > valueType_;
919 RefCountPtr< const char > expectedType_;
920 public:
921 ContinuationTypeMismatch( const Kernel::Continuation * locationCont,
922 RefCountPtr< const char > valueType,
923 RefCountPtr< const char > expectedType );
924 virtual ~ContinuationTypeMismatch( );
925 virtual void display( std::ostream & os ) const;
928 class CoreOutOfRange : public CatchableError
930 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
931 size_t argNo_;
932 const Ast::SourceLocation & argLoc_;
933 Interaction::MessageString msg_;
934 public:
935 CoreOutOfRange( const Ast::PlacedIdentifier & coreId, Kernel::Arguments & args, size_t argNo, const Interaction::MessageString & msg );
936 CoreOutOfRange( const RefCountPtr< const Interaction::CoreLocation > & coreLoc, Kernel::Arguments & args, size_t argNo, const Interaction::MessageString & msg );
937 CoreOutOfRange( Interaction::CoreLocation * coreLoc, Kernel::Arguments & args, size_t argNo, const Interaction::MessageString & msg ); /* Transfers ownership. */
938 virtual ~CoreOutOfRange( );
939 virtual void display( std::ostream & os ) const;
940 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
943 class UserOutOfRange : public CatchableError
945 RefCountPtr< const Lang::Symbol > kind_;
946 RefCountPtr< const Lang::String > source_;
947 RefCountPtr< const Lang::Integer > details_;
948 Interaction::MessageString message_;
949 public:
950 UserOutOfRange( const RefCountPtr< const Lang::Symbol > & kind, const RefCountPtr< const Lang::String > & source, const RefCountPtr< const Lang::Integer > & details, const Interaction::MessageString & message );
951 virtual ~UserOutOfRange( );
952 virtual void display( std::ostream & os ) const;
953 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
956 class UserTypeMismatch : public CatchableError
958 RefCountPtr< const Lang::Symbol > kind_;
959 RefCountPtr< const Lang::String > source_;
960 RefCountPtr< const Lang::Integer > details_;
961 RefCountPtr< const char > expectedType_;
962 RefCountPtr< const char > valueType_;
963 public:
964 UserTypeMismatch( const RefCountPtr< const Lang::Symbol > & kind, const RefCountPtr< const Lang::String > & source, const RefCountPtr< const Lang::Integer > & details, const RefCountPtr< const char > & expectedType, const RefCountPtr< const char > & valueType );
965 virtual ~UserTypeMismatch( );
966 virtual void display( std::ostream & os ) const;
967 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
970 class CoreRequirement : public CatchableError
972 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
973 Interaction::MessageString msg_;
974 public:
975 CoreRequirement( const Interaction::MessageString & msg, const RefCountPtr< const Interaction::CoreLocation > & coreLoc, const Ast::SourceLocation & callLoc );
976 CoreRequirement( const Interaction::MessageString & msg, Interaction::CoreLocation * coreLoc, const Ast::SourceLocation & callLoc ); /* Transfers ownership. */
977 /* Convenience constructor for the most common use case. */
978 CoreRequirement( const Interaction::MessageString & msg, const Ast::PlacedIdentifier & id, const Ast::SourceLocation & callLoc );
979 virtual ~CoreRequirement( );
980 virtual void display( std::ostream & os ) const;
981 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
984 class BuildRequirement : public CatchableError
986 RefCountPtr< const Interaction::CoreLocation > coreLoc_;
987 const char * dependency_;
988 public:
989 BuildRequirement( const char * dependency, const RefCountPtr< const Interaction::CoreLocation > & coreLoc, const Ast::SourceLocation & callLoc );
990 /* Convenience constructor for the most common use case. */
991 BuildRequirement( const char * dependency, const Ast::PlacedIdentifier & id, const Ast::SourceLocation & callLoc );
992 virtual ~BuildRequirement( );
993 virtual void display( std::ostream & os ) const;
994 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
997 class TeXLabelError : public RuntimeError
999 const Ast::SourceLocation & strLoc_;
1000 bool quoted_;
1001 const char * region_;
1002 Interaction::MessageString summary_;
1003 Interaction::MessageString details_;
1004 public:
1005 TeXLabelError( bool quoted, const char * region, const Interaction::MessageString & summary, const Interaction::MessageString & details, const Ast::SourceLocation & strLoc );
1006 virtual ~TeXLabelError( );
1007 virtual void display( std::ostream & os ) const;
1008 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_TEX_ERROR; }
1011 class StaticTeXLabelError : public StaticInconsistency
1013 bool quoted_;
1014 const char * region_;
1015 Interaction::MessageString summary_;
1016 Interaction::MessageString details_;
1017 public:
1018 StaticTeXLabelError( bool quoted, const char * region, const Interaction::MessageString & summary, const Interaction::MessageString & details, const Ast::SourceLocation & strLoc );
1019 virtual ~StaticTeXLabelError( );
1020 virtual void display( std::ostream & os ) const;
1021 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_TEX_ERROR; }
1024 class MultipleDynamicBind : public RuntimeError
1026 const Ast::PlacedIdentifier * id_;
1027 const Ast::SourceLocation & prevLoc_;
1028 public:
1029 MultipleDynamicBind( const Ast::PlacedIdentifier * id, const Ast::SourceLocation & loc, const Ast::SourceLocation & prevLoc );
1030 virtual ~MultipleDynamicBind( );
1031 virtual void display( std::ostream & os ) const;
1034 class UndefinedEscapeContinuation : public RuntimeError
1036 const char * id_;
1037 public:
1038 UndefinedEscapeContinuation( const char * id, const Ast::SourceLocation & loc );
1039 virtual ~UndefinedEscapeContinuation( );
1040 virtual void display( std::ostream & os ) const;
1043 class DeadStateAccess : public RuntimeError
1045 public:
1046 DeadStateAccess( );
1047 virtual ~DeadStateAccess( );
1048 virtual void display( std::ostream & os ) const;
1051 class UnFreezable : public RuntimeError
1053 public:
1054 UnFreezable( );
1055 virtual ~UnFreezable( );
1056 virtual void display( std::ostream & os ) const;
1059 class UnPeekable : public RuntimeError
1061 public:
1062 UnPeekable( );
1063 virtual ~UnPeekable( );
1064 virtual void display( std::ostream & os ) const;
1067 class UninitializedAccess : public RuntimeError
1069 public:
1070 UninitializedAccess( );
1071 virtual ~UninitializedAccess( );
1072 virtual void display( std::ostream & os ) const;
1075 class DtMinError : public CatchableError
1077 double dt_;
1078 public:
1079 DtMinError( double dt );
1080 virtual ~DtMinError( );
1081 virtual void display( std::ostream & os ) const;
1082 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
1083 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_TOLERANCE_ERROR; }
1086 class AffineTransformKillsPlane : public CatchableError
1088 double sigma2_;
1089 public:
1090 AffineTransformKillsPlane( double sigma2 );
1091 virtual ~AffineTransformKillsPlane( );
1092 virtual void display( std::ostream & os ) const;
1093 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
1096 class MissingFontMetrics : public RuntimeError
1098 RefCountPtr< const char > fontname_;
1099 const std::list< std::string > * searchPath_;
1100 public:
1101 MissingFontMetrics( RefCountPtr< const char > fontname, const std::list< std::string > * searchPath );
1102 virtual ~MissingFontMetrics( );
1103 virtual void display( std::ostream & os ) const;
1104 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_EXTERNAL_ERROR; }
1107 class FontMetricsError : public RuntimeError
1109 RefCountPtr< const char > fontname_;
1110 Interaction::MessageString message_;
1111 public:
1112 FontMetricsError( const RefCountPtr< const char > & fontname, const Interaction::MessageString & message );
1113 virtual ~FontMetricsError( );
1114 virtual void display( std::ostream & os ) const;
1115 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_EXTERNAL_ERROR; }
1118 class InsertingEmptyPage : public CatchableError
1120 public:
1121 InsertingEmptyPage( const Ast::SourceLocation & loc );
1122 virtual ~InsertingEmptyPage( );
1123 virtual void display( std::ostream & os ) const;
1124 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
1127 class InvalidGraphKeyType : public InternalError
1129 public:
1130 InvalidGraphKeyType( );
1131 virtual ~InvalidGraphKeyType( );
1134 class GraphKeyTypeMismatch : public TypeMismatch
1136 public:
1137 GraphKeyTypeMismatch( const Ast::SourceLocation & loc, const char * hint, RefCountPtr< const char > valueType );
1138 virtual ~GraphKeyTypeMismatch( );
1139 static RefCountPtr< const char > expectedType;
1140 static RefCountPtr< const char > expectedTypeOrNode;
1141 static RefCountPtr< const char > expectedTypeOrStructure;
1144 class InvalidGraphKey : public InternalError
1146 public:
1147 enum Type{ NODE, PARTITION };
1148 public:
1149 InvalidGraphKey( Type type );
1150 virtual ~InvalidGraphKey( );
1153 class GraphKeyOutOfRange : public CoreOutOfRange
1155 public:
1156 enum Type{ NODE, PARTITION };
1157 private:
1158 Type type_;
1159 public:
1160 GraphKeyOutOfRange( Type type, const Ast::SourceLocation & callLoc, const char * title, Kernel::Arguments & args, size_t argNo );
1161 virtual ~GraphKeyOutOfRange( );
1164 class InvalidGraphElement : public CatchableError
1166 public:
1167 enum Type{ NODE, EDGE };
1168 private:
1169 Type type_;
1170 public:
1171 InvalidGraphElement( Type type, const Ast::SourceLocation & loc );
1172 virtual ~InvalidGraphElement( );
1173 virtual void display( std::ostream & os ) const;
1174 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
1177 class EdgeTraceError : public CatchableError
1179 public:
1180 enum Type{ UNDIRECTED, TRACE, BACKTRACE };
1181 private:
1182 Type type_;
1183 RefCountPtr< const Lang::Value > edgeKeyFrom_;
1184 RefCountPtr< const Lang::Value > edgeKeyTo_;
1185 RefCountPtr< const Lang::Value > nodeKey_;
1186 public:
1187 EdgeTraceError( Type type, const RefCountPtr< const Lang::Value > & edgeKeyFrom, const RefCountPtr< const Lang::Value > & edgeKeyTo, const RefCountPtr< const Lang::Value > & nodeKey, const Ast::SourceLocation & loc );
1188 virtual ~EdgeTraceError( );
1189 virtual void display( std::ostream & os ) const;
1190 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
1193 class GraphDomainError : public CatchableError
1195 public:
1196 enum Type{ DIRECTED, UNDIRECTED, LOOPS, PARALLEL };
1197 private:
1198 Type type_;
1199 bool directed_;
1200 RefCountPtr< const Lang::Value > edgeKeyFrom_;
1201 RefCountPtr< const Lang::Value > edgeKeyTo_;
1202 public:
1203 GraphDomainError( Type type, bool directed, const RefCountPtr< const Lang::Value > & edgeKeyFrom, const RefCountPtr< const Lang::Value > & edgeKeyTo, const Ast::SourceLocation & loc );
1204 virtual ~GraphDomainError( );
1205 virtual void display( std::ostream & os ) const;
1206 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
1209 class InvalidGraphPartition : public CatchableError
1211 RefCountPtr< const Lang::Value > partition_;
1212 RefCountPtr< const Lang::SingleList > partitions_;
1213 public:
1214 InvalidGraphPartition( const RefCountPtr< const Lang::Value > & partition, const RefCountPtr< const Lang::SingleList > & partitions, const Ast::SourceLocation & loc );
1215 virtual ~InvalidGraphPartition( );
1216 virtual void display( std::ostream & os ) const;
1217 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
1220 class GraphPartitionViolation : public CatchableError
1222 RefCountPtr< const Lang::Value > sourceKey_;
1223 RefCountPtr< const Lang::Value > targetKey_;
1224 RefCountPtr< const Lang::Value > partition_;
1225 public:
1226 GraphPartitionViolation( const RefCountPtr< const Lang::Value > & sourceKey, const RefCountPtr< const Lang::Value > & targetKey, const RefCountPtr< const Lang::Value > & partition, const Ast::SourceLocation & loc );
1227 virtual ~GraphPartitionViolation( );
1228 virtual void display( std::ostream & os ) const;
1229 virtual RefCountPtr< const Lang::Exception > clone( const Kernel::ContRef & cont ) const;
1233 class UndefinedCrossRef : public PostCondition
1235 private:
1236 RefCountPtr< const char > ref_;
1237 public:
1238 UndefinedCrossRef( const Ast::SourceLocation & loc, RefCountPtr< const char > ref );
1239 virtual ~UndefinedCrossRef( );
1240 virtual void display( std::ostream & os ) const;
1243 class InvocationError : public Exception
1245 Interaction::MessageString msg_;
1246 bool justAWarning_;
1247 public:
1248 InvocationError( const Interaction::MessageString & msg, bool justAWarning = false );
1249 virtual ~InvocationError( );
1250 virtual void display( std::ostream & os ) const;
1251 virtual Interaction::ExitCode exitCode( ) const { return Interaction::EXIT_INVOCATION_ERROR; }
1254 class BadSetValueState : public InternalError
1256 public:
1257 BadSetValueState( );
1258 virtual ~BadSetValueState( );
1263 namespace NonLocalExit
1265 /* The exceptions in this namespace does not represent ordinary exception conditions in the program.
1266 * Rather, they can be seen as alternative ways for particular functions to return. Thus, the caller
1267 * of such a function shall always take care of any such exceptions, and not let these be passed up.
1268 * For this reason, the classes in this namespace does not inherit from Shapes::Exceptions::Exception.
1271 class NonLocalExitBase
1273 public:
1274 NonLocalExitBase( ){ }
1277 class DynamicBindingNotFound : public NonLocalExitBase
1279 public:
1280 DynamicBindingNotFound( ){ }
1283 class CrossDirectionOfParallel : public NonLocalExitBase
1285 public:
1286 CrossDirectionOfParallel( ){ }
1289 class NotThisType : public NonLocalExitBase
1291 public:
1292 NotThisType( ){ }