## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# Error handling works but will not communicate the error type back to the user.

When an error is encountered the amount due does not calculate as expected but the error type is not printed so the user knows what happened. The loop just circles back to the beginning.

```SRV_CHRG = 2
TCKT_PRICE = 10

tckt_left = 100

def calc_price(num_tckt):
return(num_tckt*TCKT_PRICE)+SRV_CHRG

while tckt_left >=1:
print("There are {} tickets remaining.".format(tckt_left))
num_tckt = input("Hey {}. How many tickets would you like?".format(name))
try:
num_tckt = int(num_tckt)
if num_tckt > tckt_left:
raise ValueError ("There are only {} tickets left".format(tckt_left))
except ValueError as err:
print("Sorry, we ran into an issue. {}.  Please try again".format(err))
else:
amount_due = calc_price(num_tckt)
print("The total due is \${}".format(amount_due))
should_proceed = input("Do you want to proceed, Y/N?")
if should_proceed.lower() == "y":
print("SOLD")
tckt_left = tckt_left-num_tckt
else:
print("Thanks anyways {}".format(name))

print("Sorry we are sold out, {}".format(name))
```

Could you post the code you are talking about? It's hard to guess what the problem might be without seeing it...