Skip to content

Commit

Permalink
Add more descriptive error for invalid association record type
Browse files Browse the repository at this point in the history
  • Loading branch information
danschultz committed Mar 21, 2012
1 parent 1f5e0c1 commit 0b440d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mesh/model/associations/AssociationCollection.as
Expand Up @@ -273,7 +273,12 @@ package mesh.model.associations

private function get recordType():Class
{
return Class( getDefinitionByName(options.recordType) );
try {
return Class( getDefinitionByName(options.recordType) );
} catch (e:ReferenceError) {
throw new ReferenceError("Record type '" + options.recordType + "' not found.");
}
return null;
}

/**
Expand Down

0 comments on commit 0b440d6

Please sign in to comment.