Wednesday, August 24, 2011

Nitrogen, an Erlang web application library/framework Part 10


For those just now encountering this series, you'll want to start with Part 1, and at least have Introduction to Nitrogen open in another tab.


Slide 80: Extending Nitrogen: Handlers - Part 3 - continued


I floundered around in the code until I found a mention of the logging that Nitrogen does. Logging! The first thing I should have looked at. There, in /home/sps/erlang-libs/nitrogen/rel/nitrogen/log/sasl-error.log I found this:

exception throw: {must_define_a_nitrogen_behaviour,my_security_handler}
in function wf_handler:set_handler/2
in call from nitrogen_mochiweb:loop/1
in call from mochiweb_http:headers/5

But I did define a nitrogen behavior! Except, apparently, Erlang shows its european heritage by using the British spelling of behavioUr. Fix that. Compile. Run. Behave as expected!

The End


That's the end of the tutorial, and thus the end of this series. I'll start a new series when I encounter a new tutorial to study thoroughly.

No comments:

Post a Comment