Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6788665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:30:44+00:00 2026-05-26T17:30:44+00:00

Reading here , it seems modelling a custom exception class using a generalisation is

  • 0

Reading here, it seems modelling a custom exception class using a generalisation is common place. What it doesn’t mention is how I can model an association with a class that could potentially throw the custom exception. Note, I’m not asking how to model the sequence behaviour when it comes to raising the exception; I’m specifically wanting to model the association. Or is this a misuse of the class diagram?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:30:45+00:00Added an answer on May 26, 2026 at 5:30 pm

    Probably like this:

    enter image description here

    Note that <<throws>> isn’t a standard UML stereotype. There’s nothing wrong with that – it’s perfectly fine to define your own. If you want to stick to standards though, <<create>> is probably the closest. (See here for list of supported stereotypes as at UML 2.1).

    You could model MyClass-MyException as a simple binary association rather than a dependency but it doesn’t really hold semantically; there’s no systematic relationship among them. Similar to the case where a Factory creates instances. There’s a good article on Dependency relationships here if you need more info.

    is this a misuse of the class diagram?

    Not if you find it useful. UML is a tool: use it where & how it helps, ignore it where it doesn’t. Case in point: pedantically, MyClass doesn’t throw any exceptions, one or more methods of MyClass throws the Exception. So the dependency is an abstraction. However as long as:

    • you – and whomever else needs to read the model – understands that, and
    • it’s useful

    then it’s not misuse, it’s use.

    hth.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From what I can tell from reading everything I can find here, this doesn't
Reading through some of the questions here, the general concensus seems to be that
I've been reading things here and there for a while now about using an
As you can see by reading my other thread today here , I'm having
From reading a few questions and answers here, it seems that a telnet stream
reading the docs here:http://grails.org/plugin/jquery-ui it says to use a custom theme I should put
By reading the documentation here it seems to me that re.compile(r'^[-\w]+$') would just search
After reading some posts here on the advantages of using source control for a
After doing some reading on the Model View Controller pattern it seems that the
From reading here and around the net, I'm close to assuming the answer is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.