|
|
| Author |
Message |
< Yaws mailing list ~ new function - yaws_api:binding_exists/1 |
| Guest |
Posted: Wed Sep 20, 2006 9:13 am |
|
|
|
Guest
|
I introduced a new function in yaws_api in order to work around the
error handling in binding/1.
binding(Key) ->
case get({binding, Key}) of
undefined -> erlang:fault({unknown_binding, Key});
Value -> Value
end.
I added another function to test for a binding which allows me to
write code to work around this:
binding_exists(Key) ->
case get({binding, Key}) of
undefined -> false;
_ -> true
end.
Claes, If this function or some other way to achieve the same goal
suits you, please add it.
thanks, ke han
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Sep 20, 2006 12:34 pm |
|
|
|
Guest
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|