GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Architecture
  • Refactoring
  • Agile
  • Delivery
  • Microservices
  • Data
  • Testing
  • DSL
  • About
  • Books
  • FAQ
  • Videos
  • Content Index
  • Fragments

This view

  • Original page
  • New address

GeezerVison is showing refactoring.com — Replace Error Code with Exception

Replace Error Code with Exception

open in web edition

How do I access the web edition?

refactorgram

if (data)
  return new ShippingRules(data);
else
  return -23;

if (data)
  return new ShippingRules(data);
else
  throw new OrderProcessingError(-23);
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.