Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

Commit

Permalink
Throw an exception if the class couldn't be instantiated.
Browse files Browse the repository at this point in the history
  • Loading branch information
bysse committed Mar 21, 2013
1 parent ee87749 commit 8dacf72
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ package org.swiftsuspenders.typedescriptions
case 8 : result = new type(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]); break;
case 9 : result = new type(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]); break;
case 10 : result = new type(p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9]); break;
default: throw new Error("The constructor for " + type + " has too many arguments, maximum is 10");
}
p.length = 0;
return result;
}
}
}
}

0 comments on commit 8dacf72

Please sign in to comment.