Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are a lot of layers to this answer depending on what you want to see and how deep down the rabbit hole you want to go.</p> <hr> <p>Let's start with the easy stuff:</p> <p>The error you are getting tells me that a call to <code>static_resource:resource_exists/2</code> resulted in a call to <code>filename:join/1</code> which failed because it was passed <code>[]</code> as its argument. That should help you track down the issue.</p> <p>Recommended reading: <a href="http://learnyousomeerlang.com/errors-and-exceptions" rel="nofollow">errors-and-exceptions</a></p> <hr> <p>A crude way to track down errors in any language is just to add print statements at strategic loctations. In this case you can use <code>io:format/2</code> or <code>erlang:display/1</code> to display whatever you want to the console. For example:</p> <pre><code>... erlang:display("I'm inside resource_exists!"), StuffToJoin = ["foo", "bar"], erlang:display(StuffToJoin), filename:join(StuffToJoin), ... </code></pre> <p>Just reload the page you should see the value printed in the console (assuming the appropriate function was called as part of the reload).</p> <hr> <p>If you want to manually test a resource (like in a unit test) you can do something like the following:</p> <pre><code>Headers = [{"Host", "mydomain.com"}, {"user-agent", "Firefox"}], Context = [], Path = "/static", ReqData = wrq:create('GET', {1,1}, Path, mochiweb_headers:from_list(Headers)), static_resource:resource_exists(ReqData, Context) </code></pre> <hr> <p>If you want a deep look at how to debug webmachine, you can read <a href="http://webmachine.basho.com/debugging.html" rel="nofollow">this</a>. You can get pretty far with the above, but doing a full trace can be helpful if you need to see the decision graph.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload